+ 1

How can you print a number if i does not equal a number

22nd Jun 2016, 6:55 AM
sophie
sophie - avatar
2 Answers
+ 2
Is 'i' one of your variables? If so, you could try if i != n: print (n) Variables n and i should be defined first. Hope I've understood you correctly.
22nd Jun 2016, 7:50 AM
Does He Take Sugar
Does He Take Sugar - avatar
0
number inside loop? if i got your question right try x = x + 1 for each iteration and then simply print(x) x should be initialized before 1st usage
22nd Jun 2016, 7:04 AM
John Doe
John Doe - avatar