Using Python Display Largest Number Smallest Number Sum Numbers Average Numbers File Numbe Q37140315

using python

Display the largest number, thesmallest number, the sum of the numbers ,the average of the numbersin the file Numbers.txt. Hint; you can use a list to make asimpler program.

(File Numbers):692364


Solution


try: f = open(“Numbers.txt”) small, large, total, count = 0, 0, 0, 0 for line in f: num = float(line.strip()) if count == 0: small, large = num, num

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.