+ 2
What am I doing wrong here? I want it to print the value of x, not the letter x...
10 Respostas
+ 1
Something like this?
https://code.sololearn.com/cfV9KFUN7Uo8/?ref=app
+ 2
x = 50
while x > 5:
x = x - 5
print (x , "greater than")
if x == 5:
print ('FIVE')
https://code.sololearn.com/cxlw20a0nb8c/?ref=app
+ 2
My code is returning 5 is greater than 5 too
+ 2
Thanks! Much appreciated!
+ 1
Thanks a lot!.!.!
+ 1
That's different than the way I remember learning it but that is the output I was attempting to get...
+ 1
Is it more like this?
x = 50
while x > 5:
x = x - 5
print ('x' , ' is', x, " greater than")
if x == 5:
print ('FIVE')
+ 1
I was wondering about that too... I thought it should have jumped to the if statement at that point... I don't know why it's printing 5 when it should be going from 10 to printing out FIVE...