Python Quiz marks system not working

I tried to make a quiz where if you get a correct answer then you get marks

But here it does not add your marks

import time
print("You will get some questions and if your answer is correct then you will get points")
time.sleep(1.5)
print("There will be a total of 10 questions in this quiz")
time.sleep(1)
print("This quiz is about python syntax")

Marks = 0

#System for the question 1
Question_1 = print("Q1: What is the syntax of print statement")
time.sleep(1)
Answer_1 = input("A1: ")

if Answer_1 == "print()":
    print("Your answer is correct you can move to the next question")

    Marks + 1
    
else:
    print("Your answer is not correct you cannot move forward")


#System for the question 1
Question_2 = print("Q2: Create a variable called as 'FirstNumber' and assign 50 to it")
time.sleep(1)
Answer_2 = input("A2: ")

if Answer_2 == "FirstNumber = 50" or Answer_2 == "FirstNumber = int(50)":
    print("Your answer is correct you can move to the next question")

    Marks + 1
else:
    print("Your answer is wrong you may not move to the next question")

time.sleep(1)
print("You have successfully submitted your test!")
time.sleep(1)
print("Calculating Marks......")
time.sleep(3)

print("Your marks is", Marks)

This is the program. I am still a beginner but I am ok with python. Please help as it will help me a lot

It prints this:
image

You have:

Marks + 1

All that does is add one to Marks and throw the answer away. You need to actually assign the new value back to Marks, using either of these:

Marks = Marks + 1

# shortcut
Marks += 1
1 Like

Yeah thanks for the solution. it works. I was thinking of how to add value and did not know how to. Thanks for the help! :grinning: