subject

In Python. You have started your own company (congratulations!) that sells cute dog pictures. The file available named "sales. json" holds the sales of each day of the past year. Use the load function of the json module and the open built-in function to access the data in this file and print the average sales for the entire year (using the Sum and Count pattern).
sum pattern
sum = 0
for item in a_list
sum = sum + item
count pattern
count = 0
for item in a_list
count = count + 1
sales. json
[911.15, 1136.34, 872.03, 894.44, 1099.52, 1065.87, 1033.29, 1224.24, 883.07, 1260.14, 1011.57, 910.28, 941.62, 844.24, 1161.68, 919.9, 814.59, 1064.5, 913.12, 1137.3, 962.34, 979.25, 907.83, 990.99, 1110.69, 1010.35, 876.52, 1129.49, 834.49, 1115.12, 1101.72, 1102.5, 909.42, 1166.48, 1011.2, 1138.01, 1175.25, 950.86, 1132.81, 786.67, 866.86, 1119.29, 950.24, 956.61, 1132.45, 876.86, 979.24, 936.77, 972.52, 1155.65, 918.41, 994.6, 857.96, 1164.99, 1094.37, 1043.25, 1112.53, 1133.7, 1220.73, 1072.77, 1034.75, 1133.28, 1021.64, 1057.54, 865.47, 996.03, 1214.58, 922.35, 912.92, 985.26, 1255.89, 1035.66, 949.23, 954.49, 943.99, 1254.5, 1071.76, 1095.84, 1021.62, 1047.05, 694.42, 1014.13, 1012.63, 987.71, 1091.1, 1060.01, 909.82, 1203.05, 981.47, 849.15, 1060.41, 947.91, 1044.57, 1137.45, 986.85, 972.31, 933.94, 1135.71, 998.93, 1047.57, 993.17, 861.09, 954.42, 976.09, 1060.28, 1157.98, 1067.41, 1305.02, 1282.33, 1128.2, 1227.94, 1292.34, 1176.82, 985.38, 957.24, 995.26, 823.24, 982.35, 893.56, 1051.88, 1054.83, 1309.99, 966.28, 986.56, 891.29, 1129.03, 1062.96, 1152.34, 875.12, 1124.56, 1155.2, 1155.36, 1122.62, 1075.9, 1123.01, 1208.98, 987.1, 1064.69, 1016.01, 1079.51, 1241.18, 1012.84, 1015.95, 1103.88, 991.63, 916.74, 1144.64, 1155.62, 1030.55, 1097.42, 1153.02, 1102.44, 1176.89, 1130.34, 979.62, 1074.35, 1045.72, 1065.48, 1026.57, 1138.26, 1018.55, 1168.18, 964.64, 935.16, 1023.37, 1118.44, 1034.02, 1048.81, 905.15, 1024.07, 1007.56, 939.96, 843.4, 1123.7, 1130.96, 1020.35, 938.21, 1102.38, 1014.67, 1167.83, 985.28, 1010.65, 1065.0, 1057.32, 1174.08, 1167.57, 1183.51, 963.77, 1111.02, 1156.93, 1247.87, 995.34, 1180.28, 1052.77, 1140.56, 1155.49, 1263.62, 1255.16, 1121.0, 1083.64, 946.39, 1031.37, 1130.64, 1180.0, 1231.12, 1201.75, 932.79, 1273.39, 1060.91, 930.35, 1227.58, 1150.08, 1141.26, 1152.91, 1167.51, 1123.36, 1344.73, 1253.99, 1013.93, 1206.09, 1003.38, 1083.16, 1059.09, 1199.37, 1185.96, 1274.17, 1299.3, 1135.35, 1070.3, 1182.83, 1306.7, 992.2, 1129.73, 795.36, 1004.5, 1187.24, 1244.41, 1013.16, 1146.26, 1161.29, 1195.38, 1017.68, 1166.3, 1264.26, 1228.04, 1074.16, 1095.37, 1038.6, 1257.41, 1120.74, 1021.0, 1173.81, 1219.85, 1172.47, 1290.09, 1074.48, 1217.23, 1075.44, 895.97, 962.46, 1192.65, 1070.15, 1183.04, 1105.65, 1099.08, 1106.82, 1127.86, 1215.6, 1127.33, 1166.0, 1377.46, 1160.5, 1063.91, 1075.07, 1100.73, 1138.3, 1131.67, 1151.85, 1067.95, 1066.01, 1054.63, 985.28, 1033.34, 1085.31, 1320.32, 1165.31, 1278.56, 962.53, 1178.73, 979.09, 1036.28, 1243.85, 1207.88, 1081.51, 1034.08, 1036.91, 1248.44, 1191.8, 1075.45, 1190.44, 1078.16, 1067.67, 1159.71, 1002.37, 1207.05, 1150.97, 1146.62, 1131.24, 1150.22, 1023.72, 1163.27, 1183.26, 1129.01, 1295.35, 992.8, 1026.04, 1138.15, 1193.21, 1163.61, 1329.73, 1250.16, 1143.47, 1172.16, 1061.67, 1053.88, 1371.74, 1274.31, 1163.63, 1211.39, 1122.26, 1124.38, 1053.38, 1019.32, 1336.04, 1116.46, 1150.27, 1324.75, 1192.63, 1309.1, 1150.31, 1281.37, 1207.23, 1086.88, 1132.32, 1221.73, 1161.69, 900.14, 1119.06, 1265.14, 1090.41, 1006.88, 1205.77, 1320.42, 1125.44, 1291.51, 1069.33, 1024.78, 962.39, 1114.9, 1141.25, 1100.02, 1080.33, 1002.9, 1265.88, 1186.42]

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 12:30, gerardoblk5931
An atom's diameter is about 0.1 nanometer (1×10-9m), and a human hair is about 1×10-3m. how many times greater is a human hair than an atom's diameter? sorry pushed wronf button but this is math
Answers: 3
image
Computers and Technology, 22.06.2019 19:50, rosyposy43
Write a car class having two private member variables called tank and speed. write public methods called pumpgas and gofast. the method pumpgas gets an integer for gas that must be pumped. that value needs to be added to tank (no more than 20 gallons). it must return the amount of gas that is purchased ($4 per gallon). the method gofast should increase the speed by 5 each time it is called. write a constructor for the above class that initialized both variables to zero. write a tostring to display both the tank and speed when the car is printed. modify the car class to implement the interface comparable and an interface called carinter having the public methods in carinter. write the main program to create an array of size 5 of type car. create 5 car objects having each location of the array to refer to one of the cars. test the pumpgas, gofast, equals method on the array items. write an enhanced loop to print all the car values (using a tostring written last time).write a generic method to find the minimum of four items. pass int, double, char, string and car objects to test this method.
Answers: 1
image
Computers and Technology, 23.06.2019 02:00, vivian2020
Read this excerpt from helen keller’s autobiography, the story of my life. have you ever been at sea in a dense fog, when it seemed as if a tangible white darkness shut you in, and the great ship, tense and anxious, groped her way toward the shore with plummet and sounding-line, and you waited with beating heart for something to happen? i was like that ship before my education began, only i was without compass or sounding-line, and had no way of knowing how near the harbour was. "light! give me light! " was the wordless cry of my soul, and the light of love shone on me in that very hour. . the morning after my teacher came she led me into her room and gave me a doll. the little blind children at the perkins institution had sent it and laura bridgman had dressed it; but i did not know this until afterward. when i had played with it a little while, miss sullivan slowly spelled into my hand the word "d-o-l-l." i was at once interested in this finger play and tried to imitate it. when i finally succeeded in making the letters correctly i was flushed with childish pleasure and pride. running downstairs to my mother i held up my hand and made the letters for doll. i did not know that i was spelling a word or even that words existed; i was simply making my fingers go in monkey-like imitation. in the days that followed i learned to spell in this uncomprehending way a great many words, among them pin, hat, cup and a few verbs like sit, stand and walk. based on this excerpt, which words best describe helen keller?
Answers: 2
image
Computers and Technology, 23.06.2019 21:00, kkpsmith
Alcohol’s affects on the cornea and lens of the eye make it more difficult
Answers: 1
You know the right answer?
In Python. You have started your own company (congratulations!) that sells cute dog pictures. The f...

Questions in other subjects:

Konu
Mathematics, 09.06.2020 16:57