Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- num = int(input('Enter the number: ',))
- n = num
- count = 0
- while num > 0:
- num = num//10
- count = count + 1
- print('No of digits: ',str(count))
- if count%2 == 0:
- print('Print it is even')
- print('The square of the number is: ',n**2)
- elif count%2 != 0:
- print('It is odd')
- print('The square root of the number is: ',n**0.5)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement