Aug-26-2019, 09:11 PM
so here is my code
i am writing in JetBrains pycharm
elif im.lower() in ("inh, inhalation, inhala"): # inhalation barn = (input("Barn eller voksen? ")) if barn.lower() in ("voksen", "vok"): # to adults print("1 mg blandes op i 2 ml saltvand og gives på nebulisator") elif barn.lower() in ("barn", "ba", "bar"): # to child vaegt = int(input("Hvad vejer barnet? ")) inhalation = vaegt * 0.1 #Here is what should be calculated if inhalation > 1: print("1 mg blandes op i 2 ml saltvand og gives på nebulisator") else: print(inhalation, "mg blandes op i 2 ml saltvand og gives på nebulisator") #This is broken, i think.if you type in "7" in line 6, the output will be 0.7000000000000001. it just needs to be 0.7. why does it do that?
i am writing in JetBrains pycharm