0

What's wrong with this code?

As a novice I've just scribbled something fairly basic in Python and it doesn't work https://code.sololearn.com/c3AaLYU4upc8/?ref=app

7th Aug 2018, 7:07 PM
Marcin Boguslawski
Marcin Boguslawski - avatar
5 Respostas
+ 4
Markus, thank you. so obvious! Perhaps I should start learning Py on a desktop rather than on my mobile!
7th Aug 2018, 8:59 PM
Marcin Boguslawski
Marcin Boguslawski - avatar
+ 2
remove = sign from the first print.
7th Aug 2018, 8:16 PM
Markus Kaleton
Markus Kaleton - avatar
+ 2
looks like a little test 😉😉😉
7th Aug 2018, 8:22 PM
Oma Falk
Oma Falk - avatar
0
By default input returns a string. You can convert it to an integer be doing x = int(input("Blablabla")) Or if int(x) == 5:
7th Aug 2018, 7:13 PM
Paul Grasser
Paul Grasser - avatar
0
Paul, thank you. I've corrected the code as per your advise and it seems to work as there is no error message. however, after keying a number the code just goes blank. nothing happens. Could you have another glance at it please? x = int (input ("What is X: ")) print=("Does X equal 5?") if x == 5: print("Yes") else: print("No")
7th Aug 2018, 7:32 PM
Marcin Boguslawski
Marcin Boguslawski - avatar