+ 1
How can one make questions on the veiwer with the input function?
I have tried to make a question with a right and wrong answer but what I tried has failed at that goal and ask for advice for the code that goes by the name of "If". This is being worked on with python3.
2 Réponses
+ 11
Why not post link to the code snippet?
By the way if you want an integer value, default value of an input() in python 3 is string. So you might have to convert it to int.
+ 1
you did:-
true=20
false=10
inut=input("5 bigger than 20? Is it true or false?")
print(inut)
if inut==false:
print("correct")
# should be :-
inut=input("5 bigger than 20? Is it true or false?")
print(inut)
if inut=="false":
print("correct")