Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

What will be the output after the following code is executed and the user enters 7.55 at the first prompt def main(): try: hours -

image text in transcribed

What will be the output after the following code is executed and the user enters 7.55 at the first prompt def main(): try: hours - int(input("Enter total hours worked? ")) hourly_rate = float (input ("Enter rate per hour (QAR) ") ) payment = hours "hourly_rate f - open( 'Tax-txt', 'r') tax_rate - float (f, read ()) tax_amount = tax_rate*payment print(tax_amount) except FileNotFoundError: print('ERROR: file not found') except ValueError: print ('ERROR: total hours worked must be integer') main() BRROR: file not found RRROR: total hours worked must be integer ERROR: file not found RRROR: total hours worked must be integer Tax_amount will be displayed, based on the tx,rate in the Tax,txt file

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

Probabilistic Databases

Authors: Dan Suciu, Dan Olteanu, Christopher Re, Christoph Koch

1st Edition

3031007514, 978-3031007514

More Books

Students also viewed these Databases questions

Question

Conduct an effective performance feedback session. page 360

Answered: 1 week ago