Python Challenge (Numeric Processing And Files)

Published: 16 November 2020
on channel: Novuspad
104
5

#python #pythonchallenges #files
In this video we will cover some python challenges, and how to solve them. However these challenges are made to test you, and help build your skills so please try to solve them before watching this video!

Hope this helps solidify your knowledge on files, and numeric processing with files, and hope you enjoy the video!

Twitter:   / bitwizard8  
Discord:   / discord  

Program Description: Numeric Processing

In this assignment, we will be utilizing functions to read and write data to files. Attached to the
assignment is the file “random.txt” (https://pastebin.com/xBB706tr). This file contains an unspecified amount of random numbers, with
each number entered on its own line.

Behavior:
Your task is to create separate functions to perform the following operations:
1. Read all numbers from the file and display them to the screen
2. Count the amount of numbers stored in the file and display to the screen
3. Calculate the sum of all numbers in the file and display to the screen
4. Calculate the average of all numbers in the file and display to the screen
5. Write the results from the prior functions (amount, sum, average) to a separate file named
“result.txt”

Each function should be executed in the order listed above at runtime, without the need for user
interaction.

The structure and overall design of each function is left up to you, as long as the intended functionality
is accomplished.

Also be sure to implement docstrings for each function to provide proper documentation.


Watch video Python Challenge (Numeric Processing And Files) online without registration, duration hours minute second in high quality. This video was added by user Novuspad 16 November 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 104 once and liked it 5 people.