Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Add comments as appropriate. Be sure that your program output is neatly presented to the user. Add documentation comments to your functions. 2. Modify

1. Add comments as appropriate. Be sure that your program output is neatly presented to the user. Add documentation comments to your functions.

2. Modify your last GeoPoint program and add exception handling.

3. Wrap the code inside the main do another? loop of your last program with a try block.

4. Add three except blocks.

a. The first will catch a TypeError exception and display Wrong data type!

b. The second will catch an NameError and display a message that makes sense.

c. The third will catch a generic Exception along with its object e and display the message Something went wrong: , e so that the error message e is displayed.

Hints

The code will look something like this (yours may vary):

while True:

try

your code here

except TypeError :

print "Wrong data type!"

except NameError:

print your custom message

except Exception,e:

print "Something went wrong: ", e

doAnother = input('Do another (y)? ')

if doAnother = n:

break

The image below is the last GeoPoint program

image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Professional SQL Server 2012 Internals And Troubleshooting

Authors: Christian Bolton, Justin Langford

1st Edition

1118177657, 9781118177655

More Books

Students also viewed these Databases questions

Question

=+4. Explain the benefits of broadbanded pay systems.

Answered: 1 week ago

Question

Write an elaborate note on marketing environment.

Answered: 1 week ago

Question

Why do HCMSs exist? Do they change over time?

Answered: 1 week ago