Advertisement
adhar

Untitled

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