Created
September 19, 2023 10:06
-
-
Save Khuirul-Huda/33b7fd1f802544e3dd73d5e9a8a06931 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Muhammad Khuirul Huda | |
umur = int(input("Masukkan Umur Anda: ")) | |
jenisKelamin = input("Masukkan Jenis Kelamin Anda: ") | |
hasilTes1 = float(input("Hasil Tes 1: ")) | |
hasilTes2 = float(input("Hasil Tes 2: ")) | |
kolomC = 0 | |
kolomE = 0 | |
if umur >= 20 and umur <= 30: | |
if jenisKelamin[0] == 'L' or jenisKelamin[0] == 'l': | |
if hasilTes1 >= 38 and hasilTes1 <= 40: | |
kolomC = 3 | |
elif hasilTes1 > 35 and hasilTes1 <= 37: | |
kolomC = 2 | |
elif hasilTes1 <= 35: | |
kolomC = 1 | |
if hasilTes2 >= 14 and hasilTes2 <= 16: | |
kolomE = 3 | |
elif hasilTes2 > 11 and hasilTes2 <= 13: | |
kolomE = 2 | |
elif hasilTes2 <= 11: | |
kolomE = 1 | |
elif jenisKelamin[0] == 'P' or jenisKelamin[0] == 'p': | |
if hasilTes1 >= 34 and hasilTes1 <= 36: | |
kolomC = 3 | |
elif hasilTes1 >= 32 and hasilTes1 <= 34: | |
kolomC = 2 | |
elif hasilTes1 <= 31: | |
kolomC = 1 | |
if hasilTes2 > 10 and hasilTes2 <= 13: | |
kolomE = 3 | |
elif hasilTes2 >= 8 and hasilTes2 <= 10: | |
kolomE = 2 | |
elif hasilTes2 < 8: | |
kolomE = 1 | |
elif umur >= 31 and umur <= 40: | |
if jenisKelamin[0] == 'L' or jenisKelamin[0] == 'l': | |
if hasilTes1 > 35 and hasilTes1 <= 37: | |
kolomC = 3 | |
elif hasilTes1 > 32 and hasilTes1 <= 35: | |
kolomC = 2 | |
elif hasilTes1 >= 30 and hasilTes1 <= 32: | |
kolomC = 1 | |
if hasilTes2 >= 28 and hasilTes2 <= 30: | |
kolomE = 3 | |
elif hasilTes2 > 25 and hasilTes2 <= 27: | |
kolomE = 2 | |
elif hasilTes2 < 25: | |
kolomE = 1 | |
elif jenisKelamin[0] == 'P' or jenisKelamin[0] == 'p': | |
if hasilTes1 > 30 and hasilTes1 <= 32: | |
kolomC = 3 | |
elif hasilTes1 >= 28 and hasilTes1 <= 30: | |
kolomC = 2 | |
elif hasilTes1 < 28: | |
kolomC = 1 | |
if hasilTes2 > 22 and hasilTes2 <= 24: | |
kolomE = 3 | |
elif hasilTes2 >= 20 and hasilTes2 <= 22: | |
kolomE = 2 | |
elif hasilTes2 < 20: | |
kolomE = 1 | |
kolomF = (kolomC + kolomE) / 2 | |
if kolomF >= 2.5: | |
kriteriaKebugaran = "Sangat Bugar" | |
elif kolomF >= 2: | |
kriteriaKebugaran = "Cukup Bugar" | |
elif kolomF >= 1: | |
kriteriaKebugaran = "Kurang Bugar" | |
print("Umur Anda Adalah:", umur) | |
print("Jenis Kelamin Anda Adalah:", jenisKelamin) | |
print("Tingkat Kebugaran Anda adalah:", kolomF, "(Skor)", "Keterangan:", kriteriaKebugaran, "(keterangan)") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment