Advertisement
Guest User

Barbona_ejercicio7

a guest
Mar 30th, 2020
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  1. #  Pedir un número entre 0 y 9.999 y decir cuántas cifras tiene.
  2.  
  3. print ('escribe el primer numero del 0 al 9999')
  4. numero=int(input())
  5. if numero<10:
  6.     print('tiene 1 cifra')
  7. elif numero<100:
  8.     print('tiene 2 cifras')
  9. elif numero<1000:
  10.     print('tiene 3 cifras')
  11. elif numero<10000:
  12.     print('tiene 4 cifras')
  13. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement