Advertisement
dendy_asadilla

Angka inputan python

Oct 23rd, 2014
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.49 KB | None | 0 0
  1. Input = None
  2. Awal = None
  3. Akhir = None
  4. A = None
  5. B = None
  6. C = None
  7. D = None
  8.  
  9. def text_prompt(msg):
  10.   try:
  11.     return raw_input(msg)
  12.   except NameError:
  13.     return input(msg)
  14.  
  15.  
  16. Input = float(text_prompt('Inputan'))
  17. Awal = float(text_prompt('Awal'))
  18. Akhir = float(text_prompt('Akhir'))
  19. A = Input
  20. B = Input
  21. C = Input * 10
  22. D = Input
  23. print(D)
  24. while A >= Awal and A <= Akhir:
  25.   if A == B + 10:
  26.     B = B + 10
  27.     print(A)
  28.   elif A >= C and A < C + 10:
  29.     print(A)
  30.   A = A + 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement