Advertisement
Guest User

FrancoSM_Ejercicio8

a guest
Apr 6th, 2020
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.26 KB | None | 0 0
  1. #8. Pedir un número entre 0 y 9.999 y mostrarlo con las cifras al revés.
  2.  
  3. A=int(input('un numero entre 0 y 9.999 de cuatro cifras '))
  4. C4=A%10
  5. C3=int((A%100)/10)
  6. C2=int((A%1000)/100)
  7. C1=int((A-(A%1000))/1000)
  8. print('Se muestra '+str(C4)+str(C3)+str(C2)+str(C1))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement