Voorwaardelijke herhaling - Demo

Sign in to test your solution.
zout = int(input("Gewicht zout in waterverzachter: ")) aantal_zakken = 0 gewicht_zoutzak = int(input("Gewicht zak zout: ")) if zout + gewicht_zoutzak <= 100: zout += gewicht_zoutzak aantal_zakken += 1 gewicht_zoutzak = int(input("Gewicht zak zout: ")) print(f"{aantal_zakken=} {zout=}")
You can submit as many times as you like. Only your latest submission will be taken into account.
Sign in to test your solution.

  Python sandbox

This window allows you to run Python code without installing a thing. The code you write here is <b>not</b> automatically submitted to Dodona.