2 Python programsbased on week 5 flowcharts and requirements. compulsory to use loops, do not use function call Problem1: >>> flag = 1 >>> while(flag...
View the step-by-step solution to:

Question

2 Python programs based on week 5 flowcharts and requirements. compulsory to use loops, do not use function

call


Problem1:

>>> flag = 1

>>> while(flag == 1):

hourlyRate = float(input("Enter hourly rate : "))

hoursWorked = float(input("Enter the hours worked : "))

amountPaid = hourlyRate * hoursWorked

print("The Amount paid is : " + str(amountPaid))

choice = input("nWould you like to calculate again ? (y/n) : ")

if(choice == 'n'):

flag = 0

print("nThank you for using this program.")


Now in above two codes how can i change them and use "LOOPS" and no function calls

Top Answer

The below two code have loops and no function calls and these also use input to prompt the user for values and have no hard... View the full answer

py1.PNG

py2.PNG

Sign up to view the full answer

Other Answers

Since , python is highly structured language and if you want to ask the user to prompt for the choice again and again to use... View the full answer

Py1.jpg

File Edit Refactoring Source Navigate Search Project Pydev Run Window Help
Quick Access
#PyDev Pac.
P HelloWorld
Di Assign2
Pi Assign1
Pi test x
" Outline x
N
print("1.) Press Y to...

Py2.jpg

File Edit Refactoring Source Navigate Search Project Pydev Run Window Help
Quick Access
# PyDev Pac.. X
P HelloWorld
Di Assign2
P Assign1
Pi test X
Outline x
1 print("1. ) Press Y to...

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question