feat: Initial commit
This commit is contained in:
16
Cicli/media.py
Normal file
16
Cicli/media.py
Normal file
@@ -0,0 +1,16 @@
|
||||
somma = 0
|
||||
conto = 0
|
||||
|
||||
while True:
|
||||
uinput = float(input("Voto da inserire: "))
|
||||
|
||||
if uinput == -1:
|
||||
break
|
||||
|
||||
if uinput <= 20:
|
||||
somma += uinput
|
||||
conto += 1
|
||||
|
||||
|
||||
if conto != 0:
|
||||
print("La media è: ", somma/conto)
|
||||
Reference in New Issue
Block a user