Home
About
Contact
Header Ads Widget
Home
Coding Questions
_C/C++ Programs
_Python Programs
_Data Structure Programs
_Competitive Coding
Practice Problems
Key Points
Notes
MCQs
Interview
Trends
Home
python_programs
Write a python program to reverse a number.
Write a python program to reverse a number.
Rajnish Tripathi
20:42
code:-
num=
int
(
input
(
"Enumter a number"
))
rev=
0
while
num!=
0
:
rem=num%
10
# reminumder
num=num//
10
# inumteger divisionum
rev=rev*
10
+rem
print
(
rev
)
Output:-
Enter a number1234
4321
Post a Comment
3 Comments
Sadab Hussain
23:08
Good
Reply
Delete
Replies
Reply
Satyam Singh
23:16
Woww...
Reply
Delete
Replies
Reply
Satyam Singh
23:16
Woww...
Reply
Delete
Replies
Reply
Add comment
Load more...
Popular post
PPS 1st year (C programming ) handwritten notes Aktu
11:47
pps unit 1 notes
09:54
Python : missing characters : hackerrank solution
23:01
Social Plugin
MCQs
3/MCQs/post-list
Tags
c-programs
Companies
competitve programs
Data structure
doubts
key points
MCQs
Notes
practice problems
python
3 Comments
Good
ReplyDeleteWoww...
ReplyDeleteWoww...
ReplyDelete