# Loop (while, for)

# while loop
fish = 10
while fish > 2:
    fish = fish - 1
    print("You have :", fish, "fish left")
print("You only have 1 fish left")
print("You have to go to supermarket")
print("-----------------------------------------------------")

#ex.1

print("Average electic cost calculator")
electic_charge = []
month_electic_charge = int(input("Months to calculate :"))
print("Enter your electric charge for %d months" %month_electic_charge)
m = 1
while m <= month_electic_charge:
    print("Month %d: " %m, end="")
    n = int(input())
    electic_charge.append(n)
    m += 1
print("Your electic cost per month")

sum = 0
i = 1

while i <= month_electic_charge:
    print(electic_charge[i - 1], end=",")
    sum += electic_charge[i - 1]
    i += 1
print("\n")

print("\n Total Cost = %d Baht" %sum)
print("Average per month = %f Baht" %round(sum/month_electic_charge))
          