Find Jobs
Hire Freelancers

Exception Handling

$10-30 USD

Completed
Posted about 7 years ago

$10-30 USD

Paid on delivery
Modify the following code to use exception handling, such that if the user enters in # a character string, such as "hello", the exception handling code will gracefully handle # the exception, tell the user what he/she did wrong, and continue to ask the user to # enter the correct number. # # Note: Do not use the isdigit() method with your answer. You should complete this # assignment using exception handling. USER_INPUT_MIN = 1 USER_INPUT_MAX = 20 def main() : answer = 0 while (answer < USER_INPUT_MIN or answer > USER_INPUT_MAX) : answer = int(input("Enter number: ")) if (answer < USER_INPUT_MIN or answer > USER_INPUT_MAX) : print("Please enter a number between %d and %d" % (USER_INPUT_MIN, USER_INPUT_MAX)) print("Got the user's answer: ", answer) main()
Project ID: 13379865

About the project

7 proposals
Remote project
Active 7 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
Hello Sir, Raheel here. I've done too many projects in Python having great knowledge about it. I assure you that I'll deliver your project on time and you can also visit my profile for surety. I hope you will consider me to do your task Thanks
$25 USD in 1 day
4.6 (1 review)
2.0
2.0
7 freelancers are bidding on average $45 USD for this job
User Avatar
Hi there, I'm professional Python developer, I can do this with exception handling. See some of my works in the portfolio. PIng me for discussion.
$25 USD in 1 day
5.0 (29 reviews)
5.2
5.2
User Avatar
Hey there, That's easy, I can help you right now:) Let me know if you'd like to collaborate. Regards, Alex
$30 USD in 1 day
5.0 (2 reviews)
2.4
2.4

About the client

Flag of UNITED STATES
Austin, United States
5.0
8
Payment method verified
Member since Jan 22, 2017

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.