Advertisement
Guest User

Untitled

a guest
Sep 18th, 2019
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1.  
  2. while True:
  3. nilai = int(input('Masukkan nilai kocheng: '))
  4. if nilai <= 100:
  5. kelas = ''
  6. if nilai >= 86:
  7. kelas = 'A, beli!'
  8. elif nilai >= 76:
  9. kelas = 'B, beli!'
  10. elif nilai >= 66:
  11. kelas = 'C, beli!'
  12. elif nilai > 50:
  13. kelas = 'D, jangan beli!'
  14. else:
  15. kelas = 'E, jangan beli!'
  16.  
  17. print(f'Kucing berkategori {kelas}')
  18. break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement