0
whats wrong with this ?
print "Hello world " print"enter any word u want to output" x=input() print(x) i cant find whats wrong!!!!
11 Respostas
+ 2
print requires ()
try:
print("Hello world")
the same with input("question")
try:
x = input("enter any word u want to output")
+ 2
I've tried it also on Qpython3 and it works
+ 2
tnxx david lorenzi .. i was actually trying it on Qpython thats way it was not working...!! tnx a lot..
+ 1
I tried the code in the playground. I had to add brackets for the print function in the first two lines. But then the code was working.
print("Hello world ")
print("enter any word u want to output")
x=input()
print(x)
Did you also try it here in the app or somewhere else?
+ 1
in the code playground sometimes it gives me No Output, and sometimes only the first 2 instructions. But the code is correct, let's try it on pc
0
and it is showing a name error...
0
i tried this ... but it still wont work
print("Hello world ")
x=input(" enter any word :")
print(x)
0
i tried this too
print("Hello world ")
x = input(" enter any word :")
print(x)
it shows
<built-in function any>
0
i tried it on android based app called "QPython" and "decoder" :( .... thanks though...
0
If you are using python 2, the code will be like this:
print "string"
x = raw_input("prompt >>> ")
If you are using python 3:
print("string")
x = input("prompt >>> ")