xxxxxxxxxx
my_list = [1,2,3,4]
import numpy as np
print("mean = ", np.mean(my_list))
xxxxxxxxxx
def avrg(values): # where values is a list of all values
return sum(values)/len(values)
xxxxxxxxxx
History = 97
English = 92
Math = 85
Science = 86
Total = History + English + Math + Science
Average = Total/4
print('Total of grades:', Average)
xxxxxxxxxx
408 Request Timeout
HTTP 408 status code is returned when a server timeout occurs due to a slow client request. It means the server terminated the connection, resulting in the client receiving the 408 Request Timeout message. HTTP status codes communicate request status and can redirect clients to different resources.
xxxxxxxxxx
def cal_average(num):
sum_num = 0
for t in num:
sum_num = sum_num + t
avg = sum_num / len(num)
return avg
print("The average is", cal_average([18,25,3,41,5]))