0
Why does python not behave the same on my phone and my computer? Else after an if will not indent back the same, then error
x=4 if x ==5: print("yes") else print("No")
15 Antworten
+ 9
Ok let me know if it worked
+ 8
You're welcome
+ 8
Hmm guess now you know that you can get to your posts. If you have further questions or remarks please refrain from posting them here and use your message feature (unless you're on IOS)
+ 7
You forgot the : after the else
x=4
if x ==5:
print("yes")
else:
print("No")
However if you don't want those : you can do
x=4
print("Yes" if x==5 else "No")
+ 7
You could install an emulator maybe
+ 1
Thank you
0
I have not done this correction yet on the computer. But thank you for the observation. I had almost given up.
0
Just saw this window for the first time. I was not aware this could be accessed
0
Not sure hoy I got here, but intend to play with this till I can get here again at will
0
I do enjoy learning python but the phone version is so small. Why can I not have the same solo learn app on my computer?
0
Are you present now?
0
This window....the one I am in now.... How did I get here?
0
I was playing with buttons on the app..towards the top of the window (screen)
0
Sorry how dumb I am, but not faking this. I am a beginner
0
Before just now, I was now aware I could get here and see answers to my posted questions.