Question: Python Coding assignment Follow these comments and write a code that will make each comment true: // note this function is output only, so a

Python Coding assignment Follow these comments and write a code that will make each comment true: // note this function is output only, so a return statement is not required Subprogram writeNameAssn() Write "My name is: "  Write "This is assignment: " End Subprogram 
Subprogram getName() Declare text As String Write "Enter the salesperson's Name." Write "Enter * when done." Input text Return text End Subprogram Subprogram getFloat() Declare num As float Write "Enter the salesperson's monthly sales." Write "Enter 0 when done." Input num Return num End Subprogram Main Call writeNammeAssn() Declare Names[5] As String Declare Sales[5] As Float Set Max = 0 Set K = 0 Set Index = 0 Names[K] = getName() Sales[K] = getFloat() While Names[K] != "*" If Sales[K] > Max Then Set Index = K Set Max = Sales[Index] End If Set K = K + 1 Names[K] = getName() Sales[K] = getFloat() End While Write "Maximum sales for the month: " + Max Write "Salesperson: " + Names[Index] End Main Execute Main 

---------------------------------

Sample output/interaction should look like this:

My name is (Username) This is assignment (Assignment Number) Enter the salesperson's Name. Enter * when done: Tom Enter the salesperson's monthly. Enter 0 when done: 21000 Enter the salesperson's Name. Enter * when done: Nick Enter the salesperson's monthly. Enter 0 when done: 34000 Enter the salesperson's Name. Enter * when done: Herman Enter the salesperson's monthly. Enter 0 when done: 10000 Enter the salesperson's Name. Enter * when done: * Enter the salesperson's monthly. Enter 0 when done: 0 Maximum sales for the month: 34000.0 Salesperson: Nick 

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!