+ 2

Another question on basic python

Here is another program that will not work. Please help me, I will appreciate it. student =input("What is your student number?") if student == 1010: print("Welcome") elif student == 1111: print("Hello", student) else: ("sorry")

30th Jan 2019, 4:16 PM
Markie Alicia
Markie Alicia - avatar
4 Respuestas
+ 3
You need to convert the input to an integer as it will be a string by default: student = int(input('...'))
30th Jan 2019, 6:19 PM
Anna
Anna - avatar
30th Jan 2019, 8:16 PM
Lambda_Driver
Lambda_Driver - avatar
+ 2
Markie Alicia You can edit your posts. Click on the three dots on the top right corner and you'll see the option.
30th Jan 2019, 9:55 PM
Diego
Diego - avatar
0
*print("sorry")
30th Jan 2019, 4:18 PM
Markie Alicia
Markie Alicia - avatar