Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python Programming LAB # 5 - 4 0 Points Instructions: Assume you have two files containing a series of integers named numbers.txt and numbers 1

Python Programming
LAB #5-40 Points
Instructions:
Assume you have two files containing a series of integers named numbers.txt and numbers1.bxt. Wile a progrem that calculates the average of all the numbers stored in the files and handles 2 exceptions.
Steps:
Write code to process each fille:
Calculate the averege
Test for the following errors:
any IOEnor exceptions that are ralsed when the file is opened and data is read from ii.
any ValueETror exceptions that are reised when the iltems that are read from the fille are
Include Header below:
# Class: CIST 2742 Python Programming I
# Term: Fall 2022
# instructor: Chris Bishop
# Description: Solution to Lab #5
#Author: (Student Name Here)
#
# By turning in this code, I Pledge:
# 1. That I have completed the programming assignment independently.
#2 I have not copied the code from a student or any source.
#3. I have not given my code to any student.
Execute the program and take swreen capture of output.
Submit swreen capture and python(py) filercode via blecthoard.
Sample Resulit:
nutberb +11 e
Average: -21.0
nuatiersi file
Mon-numerle data found In the tile
Process finished with exit code 0
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions