0
What's wrong in my code?
https://code.sololearn.com/cV6Bsb8h1F29/?ref=app the values are not getting compared. Any ideas? it's python btw.
4 Antworten
+ 5
give yourself time to learn the basics.
otherwise it will become frustrating
+ 4
1. Python is case-sensitive language. Change all the line which has wrong case(If, Print, ...).
2. == is comparison operator. To put a value in the variable, use =.(Why line 3 is wrong while line 1 and 2 are correct?)
3. Unnecessary int(). Variable x is integer, and numbers(1000, 2000, ...) are integers. You don't have to use int() every time.(Added)
+ 4
I found more...
4. When you are accepting two or more integers, you have to get string with raw_input() and split it to get integers..(using split())
5. In the last line, there should be colon(:) after else.
+ 1
In your code, you have accidentally added letters in capital (If instead of if or AND instead of and). Python is case sensitive and will get confused when you write in capital letters. Another mistake is using two equal signs = to define a variable.
here is the correct code: https://code.sololearn.com/cwBDppyam93Y/#py