Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while True:
- nilai = int(input('Masukkan nilai kocheng: '))
- if nilai <= 100:
- kelas = ''
- if nilai >= 86:
- kelas = 'A, beli!'
- elif nilai >= 76:
- kelas = 'B, beli!'
- elif nilai >= 66:
- kelas = 'C, beli!'
- elif nilai > 50:
- kelas = 'D, jangan beli!'
- else:
- kelas = 'E, jangan beli!'
- print(f'Kucing berkategori {kelas}')
- break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement