0

Please can you help me with a If/else problem?

I'm stuck on a practice (medical . . .) Where I'm coding an app that tells patients when their blood pressure is normal range,low or high

12th Sep 2024, 11:14 AM
Enemy 001
Enemy 001 - avatar
3 Réponses
+ 1
Blood_pressure=int(input()) if Blood_pressure<=60: print(low blood pressure) if Blood_pressure<=61 and Blood_pressure<=120: print(normal blood pressure) else: print(high blood pressure)
12th Sep 2024, 11:55 AM
Wai Yip Tng
Wai Yip Tng - avatar
+ 3
Wai Yip Tng , some comments according the code sample you provided: > missing quotes around strings > conditional expressions like in this code should use if... elif... else... > wrong logic in second if... an input of 50 results in: low blood pressure normal blood pressure > in general: it is not seen as very helpful when we are going to post a *ready-made code*, as long as the op has not shown his attempt here. it is more helpful to give hints and tips, so that the op has a chance to find a solution by himself.
12th Sep 2024, 5:13 PM
Lothar
Lothar - avatar
+ 1
Fine.
18th Sep 2024, 6:10 AM
Wai Yip Tng
Wai Yip Tng - avatar