Aug-26-2019, 01:22 PM
so first here is my code.
if vaegt == 12, then I want it to be 10
if vaegt == 13, then I want it to be 15
I want this to go from 10-50. (10, 15, 20, 25 etc.)
elif medicin in ("adrenalin", "ad"):
vaegt = int(input("Hvad vejer patienten? ")) #what does the patient weight
dosis_adrenalin = vaegt * 0.01 # Dose to be given
if vaegt >= 50: # if vaegt > 50 give 0,5 mg
print("indgift = 0,5 mg")
print("volumen = 0,5 ml")
else:
if vaegt in (10, 11, 12): #This does nothing
vaegt == 10 # this does nothing
print(f"dosis = {dosis_adrenalin} mg") #it runs this part
print(f"volumen = {dosis_adrenalin} ml")
else:
print("Kan ikke finde medicinen!")i want the code to find the nearest "5"if vaegt == 12, then I want it to be 10
if vaegt == 13, then I want it to be 15
I want this to go from 10-50. (10, 15, 20, 25 etc.)
