+ 1
Guys help me out?
print("which currency is widely use in trading") input("enter your answer ") x = input if x == ("USD") print ("correct") else print("wrong")
8 Antworten
+ 4
missing colon and indentation
https://www.sololearn.com/learn/JUMP_LINK__&&__Python__&&__JUMP_LINK/2277/
read the notes in the yellow box
+ 4
hi, i put it all together and also made a small amendment at input:
print("which currency is widely use in trading")
x = input("enter your answer ").upper()
if x == ("USD"):
print ("correct")
else:
print("wrong")
+ 3
Thomas, you are absolutely right. I overlooked it. But it does work any way ;-)
+ 2
if x=="USD" :
print("correct")
else :
print("wrong")
+ 1
You had the syntax for the input all wrong
print("Which currency")
x = input("Enter answer")
if x == "USD":
print("Correct")
else:
print("Wrong")
No parentheses with if-statements, input() returns a value so you have to assign a variable while you call it and indentation was wrong
Hope this helps😁
+ 1
Thanks guys
+ 1
Lothar Yes you did basically the same thing as me, but you also made the input uppercase. Something I didnt think of😉
0
u r wlc Ahmed Nii Aryeetey