+ 4

How to print reverse of all odd numbers from 50 to 100 in python

13th Mar 2020, 9:45 AM
Suman
Suman - avatar
35 Réponses
14th Mar 2020, 8:42 AM
ANJALI SAHU
+ 6
I have tried this----- sum=0 for n in range(50,100): if n%2!=0: while n!=0: digit=n%10 sum=sum*10+digit n=n//10 print(sum)
13th Mar 2020, 9:57 AM
Suman
Suman - avatar
13th Mar 2020, 10:37 AM
Sousou
Sousou - avatar
+ 3
I mean reverse of digits should be the output. For example for 51...15 should be printed
13th Mar 2020, 10:41 AM
Suman
Suman - avatar
+ 2
I have tried but fail to print
13th Mar 2020, 9:48 AM
Suman
Suman - avatar
13th Mar 2020, 10:38 AM
Wasi
Wasi - avatar
+ 2
I will sure complete my course.But would you plz tell me for the time that how to code for this
13th Mar 2020, 11:00 AM
Suman
Suman - avatar
+ 2
odd... for i in range(99,50,-2): print(i)
14th Mar 2020, 7:13 AM
Eashan Wantu
Eashan Wantu - avatar
+ 2
How to reverse word in C e.g "Hello"
14th Mar 2020, 6:29 PM
Mohamed Ahmed Mohamed
Mohamed Ahmed Mohamed - avatar
+ 1
I wants 15,35,55,75.....in place of 51,53,55,57...... I need reverse of digits of number
14th Mar 2020, 7:25 AM
Suman
Suman - avatar
+ 1
Thank you RAJESH SAHU
14th Mar 2020, 9:15 AM
Suman
Suman - avatar
+ 1
Hey man it's simple Use this trick https://code.sololearn.com/c9SS8clqjRIf/?ref=app
14th Mar 2020, 11:47 AM
Suraj K Thapa
Suraj K Thapa - avatar
+ 1
[print(i) for i in range(99,50,-2)]
14th Mar 2020, 2:31 PM
Oma Falk
Oma Falk - avatar
+ 1
Try using the .split() function and do str(list[1]) + str(list[0])
14th Mar 2020, 10:01 PM
Fizz'in Amcası
+ 1
Suman wants to output the reverse of the odd num in [50, 100]. How to calculate the reverse of a num is also showed in code. https://code.sololearn.com/cHH30opLBqE2/?ref=app
15th Mar 2020, 1:06 AM
linzuxuan
linzuxuan - avatar
15th Mar 2020, 10:09 AM
F L a Z z Y
F L a Z z Y - avatar
0
Well you should complete the python course
13th Mar 2020, 10:53 AM
Wasi
Wasi - avatar
0
Do you mean 100 to 50... like 100, 98, 96...? if yes...heres the code for i in range(100,49,-2): print(i)
14th Mar 2020, 7:11 AM
Eashan Wantu
Eashan Wantu - avatar
0
oh 😅... then the code would be... for i in range(100,49,-1): print(i)
14th Mar 2020, 7:26 AM
Eashan Wantu
Eashan Wantu - avatar
0
Thanks Eashan Wantu but this is not what i want
14th Mar 2020, 7:30 AM
Suman
Suman - avatar