Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("lets test your knowledge about python")
- print("are you ready to play")
- user_name = input("what is your name ?")
- user_score = 0
- question1 = input("what do you type if you want the program to display something to the user?")
- question2 = input("what do you type after your if,elif, or else statement so the program knows you are evaluating something?")
- question3 = input("how many spaces is an indent in python?")
- if question1 == "print" or question1 == "Print":
- print("YES! That is correct.")
- user_score = user_score + 1
- else:
- print("Sorry - the correct answer is print")
- if question2 == ":":
- print("YES! That is correct.")
- user_score = user_score + 1
- if question3 == "2" or question3 == "4":
- print("Yes! That is correct.")
- user_score = user_score + 1
- final_score = str(user_score)
- print(user_name + " you got " + final_score + " answers correct!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement