728x90
for n in nubers:
total += n
print(f"n is {n} and total is {total}")
print(f"avg is {total/len(nubers)} total is {total} and n is {n} len(nuners) is {len(nubers)}")
print(f"avg is {total/nubers} total is {total} and n is {n} nuners is {nubers}")
################################################## len을 넣치 않음 n이
>>>>>> TypeError: unsupported operand type(s) for /: 'int' and 'list'
#
def avg1(numbers):
avg = sum(nubers) / len(nubers)
print(f"avg : {nubers} {avg}")
return avg
# ########################################## 선언한 입력부분이 실제 함수내 달라서
# def avg1(numbers):
# avg = sum(numbers) / len(numbers)
# print(f"avg : {numbers} {avg}")
# return avg
import overwatch, ov2
import sys
overwatch.test_fun()
ov2.test_fun()
########################################### 파일을 못불러와
File "<stdin>", line 1
/usr/local/bin/python3
File "<stdin>", line 1
/usr/local/bin/python3
728x90