+ 1

Can you help me slove this code !!?🤗😰

Build a python program code to solve this problem. Cikgu Badrul wants to make a program where the weight of the students is entered and the program will display the number of push -ups that need to be done by the students. Student weight = Number of push-ups less than 46 =27 46-50 =29 51-55 =31 56-60 =29 61-65 = 27 More than 65 = 25 This is my coding..it is right 😥 https://code.sololearn.com/czpAZUY6WE8j/?ref=app

1st Sep 2021, 8:35 AM
NURUL AIN SYAFIQAH BINTI MUHAMMAD NAZIR
NURUL AIN SYAFIQAH BINTI MUHAMMAD NAZIR - avatar
3 Antworten
+ 2
Rik Wittkopp thank you for your explanation 🤗😄👍👍👍
1st Sep 2021, 2:09 PM
NURUL AIN SYAFIQAH BINTI MUHAMMAD NAZIR
NURUL AIN SYAFIQAH BINTI MUHAMMAD NAZIR - avatar
+ 1
But if I put the student weight above 51 elif studentweight>=51 their push-ups will get 29 but for this push-ups must be 31😥
1st Sep 2021, 9:22 AM
NURUL AIN SYAFIQAH BINTI MUHAMMAD NAZIR
NURUL AIN SYAFIQAH BINTI MUHAMMAD NAZIR - avatar
+ 1
NURUL AIN SYAFIQAH BINTI MUHAMMAD NAZIR I had a look at the code you presented and there were some issues. I will attach a suggested code for you to review, but you may need to tweak it to suit your requirements. The syntax I have used may be a bit advanced for you. If so, let me know & I will try to explain. #nama:Nurul Ain Syafiqah binti Muhammad Nazir #kelas:2 Al Ghazali #no.maktab: KB 201004 studentweight=int(input()) if studentweight<46: print("number of push-ups 27") elif 46 < studentweight < 51: print("number of push-ups 29") elif 51 < studentweight < 56: print("number of push-ups 31") elif 56 < studentweight < 61: print("number of push-ups 29") else: print("number of push-ups 25")
1st Sep 2021, 11:34 AM
Rik Wittkopp
Rik Wittkopp - avatar