+ 2
Can you guys help me Im trying to code something and it's a error and thank you
num = zero if input() = 1: num = one print(num)
10 ответов
+ 4
Also: input returns a string, so the condition in your if statement will always be False.
+ 5
num = "zero"
if input() == "1":
num = "one"
print(num)
+ 1
Can you send fixed code please?
https://code.sololearn.com/cG63Ei2whqB6/?ref=app
+ 1
Hello, HELP MEl!
Of course you have a error, in num = zero have be num = "zero" and in num = one is num = "one".
Because there are not variable/function with that name.
Simon Sauter
You're right, is as I say.
0
In the if statement you have to use the comparison operator "==", not the assignment operator "=".
0
Oh yeah..
0
Use 0 and "1" instead of zero and one. Because the latter ones are identifiers
0
Or use quotation marks if you want to use strings.
0
I'm trying to do a project that turns numbers to word numbers
aka 1 - one
- 4
puthon