Question: 1.How would i use exceptions to write a program that will request an integer from 50 to 200. It also notifies the user if they

1.How would i use exceptions to write a program that will request an integer from 50 to 200. It also notifies the user if they inputted something other than an integer and asks them to reenter an integer.

2.Also, using exceptions how can I make changes to this code:

#If you could please give me a brief explanation as to what you did(exceptions concept) that will be helpful. Thank you

d e f readData ( ) :

d a t a f i l e = open ( d a t a , r )

a l l D a t a = [ ]

f o r l i n e i n d a t a f i l e :

l i n e l i s t = l i n e . s p l i t ( , )

a l l D a t a . append ( l i n e l i s t )

r e t u r n ( a l l D a t a )

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!