+ 1

Can anyone tell me solution of 24.2 test case in python for beginners plz.... my code in description

x=int(input()) total = 100 while x>0: if x<3: total=total print(total) continue if x>=3: total=total+100 print(total)

7th Feb 2022, 3:58 PM
Sanyam Turieha
3 odpowiedzi
+ 3
You can show us your code and we can help you to solve it yourself
7th Feb 2022, 4:04 PM
Lisa
Lisa - avatar
+ 1
You should read the task carefully. You need to input less than 5 values. It's the first mistake. The second is that you cannot assign a total value 100, because even if you enter age 2, it will retain a value of 100, which is incorrect. For example, row 9 : total = 100 + 100. If you enter the age of two people who are over 3 years old, you should get a result of 200, but you will get 300. This is my try: total = 0 x = 0 while x < 5: a = int(input()) if a > 3: total += 100 x += 1 print(total)
7th Feb 2022, 5:39 PM
Yulia
0
anuruddhika Create your own thread and explicitly which question you have.
9th Jun 2023, 9:10 AM
Lisa
Lisa - avatar