0
Help please i can't run more than 1 code in Python shell 2.7.12 it produces output for only the first line and ignores all other input... Pls some1 help me.
s= input ("Enter a name: josh") t= input ("Enter a number: 1") Print (s) Print (t) Output Enter a name: josh
3 ответов
+ 1
you have to decide what version you use, also. you have something like mixup. you say you use 2.7, but functions are 3.x-style, maybe there's a conflict?
2.7: raw_input()
3.x: input()
2.7: print x
3.x: print(x)
0
input function writes a string you passed to it and then waits for you to type something it will then assign to a variable. if you don't give your input, it will stuck on this place until you do.
also, print function is written without capital letters.
0
Yeah thanks , abt the print that was me. But i did give the input and pressed enter, yet nothing happened