Home>
Get an integer value from the standard input.
○ However, use repeat (while) so that you can enter as many items as you like.
If there is no input, exit.
- Create a function that displays the maximum, minimum, mean, median, and standard deviation of the acquired data.
code
import statistics
def F1 (A):
print ("A:", A)
print ("maximum value:", max (A))
print ("minimum value:", min (A))
print ("Arithmetic Mean:", statistics.mean (A))
print ("median:", statistics.median (A))
print ("biased standard deviation: {: .4f}". format (statistics.stdev (A)))
while True:
C = input ("number:")
if len (C) == 0:
break
C = int (A)
F1 (C)
When I entered the numbers 1,2,3, ... in this code, the error of len was broken, but the error occurred on the line of print ("maximum value", max (A)) n. I have. It was written as max () arg is an empty sequence. What can I do to fix this error?
-
Answer # 1
Related articles
- python 3x - an error occurs after registering a dictionary with a read-aloud bot on discordpy
- python: an error occurs that the type is different in the output using dict key values
- python - in raspberry pi, the error occurs only in the case of the automatic start program using systemd
- python - an error occurs in the if statement program that compares the size of numbers
- python - an error occurs when django's summer note is reflected in admin
- an error occurs during python scraping (retrieving property information from suumo)
- python - error when scraping with selenium and firefox
- [python] graphviz output format error
- python - web scraping what to do when a webdriverexception occurs on starbucks hp
- python - i get an error when connecting to a voice channel with discordpy
- python 3x - best estimator: i get an error with no syntax, so please tell me what to do
- python - an error has occurred in yolo v3
- [python] i don't know how to solve the error
- python - idle cannot resolve the "rootgeometry" error
- python - tuple error does not resolve
- python 3x - error after changing to csv file
- python error code how to deal with
- python - i get an error when i type pip3 install scikit-learn
- python - i get the error "no attribute'connect'" when connecting a signal to a slot
Trends