+ 1

why does this code shows error?

z=input("writesome") print(z) if z>5: print("p") else: print("f")

25th Sep 2017, 8:21 AM
Art Creator
Art Creator - avatar
7 Antworten
+ 12
z=int(input("writesome")) print(z) if z>5: print("p") else: print("f") # There's a need to take input as int when dealing with integers! Indentation is a must!
25th Sep 2017, 8:26 AM
Dev
Dev - avatar
+ 9
1st Oct 2017, 7:58 AM
Dev
Dev - avatar
+ 7
# @Art, please add indentations! And copy this code, it works : z=int(input("writesome")) if z>15: print("pass") else: print("fail")
26th Sep 2017, 9:22 AM
Dev
Dev - avatar
0
Python is case-sensitive
25th Sep 2017, 9:31 AM
Muhd Khairul Amirin
Muhd Khairul Amirin - avatar
0
z=int(input"writesome") if z>15: print("pass") else: print("fail")
26th Sep 2017, 6:44 AM
Art Creator
Art Creator - avatar
0
This code is also showing error
26th Sep 2017, 6:44 AM
Art Creator
Art Creator - avatar
0
Please suggest me the code
1st Oct 2017, 7:37 AM
Art Creator
Art Creator - avatar