0

Python what I did wrong pls help me

x = int(input("what is your age?")) if x < 35: print("You are young") if x > 35: print("You are old") if x == 35: print("You are middle aged")

22nd Sep 2018, 9:55 PM
Narek
Narek - avatar
13 Antworten
+ 1
It's fine. did it get any errors?
22nd Sep 2018, 10:00 PM
Arjun gowda
Arjun gowda - avatar
+ 1
oh finnaly thank you 😂 KrOW
22nd Sep 2018, 11:44 PM
Narek
Narek - avatar
+ 1
Narek In practice with that prompt you can pass ALL inputs that your program need. Take note that on SL all codes (except web codes) cannot get interactive input (like on your PC) instead you have to put ALL your input in this prompt. This is limited, but work in this way on SL
22nd Sep 2018, 11:46 PM
KrOW
KrOW - avatar
+ 1
thank you guys KrOW and Arjun gowda for help
22nd Sep 2018, 11:48 PM
Narek
Narek - avatar
0
Arjun gowda says what is your age? Traceback (most recent call last): File "..\Playground\", line 3, in <module> x= int(input("what is your age?")) EOFError: EOF when reading a line
22nd Sep 2018, 10:03 PM
Narek
Narek - avatar
0
which version of python did you use? .. try raw_input() function. instead of input().
22nd Sep 2018, 11:03 PM
Arjun gowda
Arjun gowda - avatar
0
You have to put your age in prompt before the program execution
22nd Sep 2018, 11:27 PM
KrOW
KrOW - avatar
0
i dont understand you KrOW
22nd Sep 2018, 11:34 PM
Narek
Narek - avatar
0
When you run your code, you can see a prompt where you can insert some text?
22nd Sep 2018, 11:35 PM
KrOW
KrOW - avatar
0
yes and what to text there? KrOW
22nd Sep 2018, 11:40 PM
Narek
Narek - avatar
0
You age 😁
22nd Sep 2018, 11:42 PM
KrOW
KrOW - avatar
0
KrOW can you help me where to learn python with video
22nd Sep 2018, 11:52 PM
Narek
Narek - avatar
0
Narek Im sorry i dont know video resources but here you will find other resources type https://code.sololearn.com/WaVusr8J1KvK/?ref=app
22nd Sep 2018, 11:57 PM
KrOW
KrOW - avatar