PYTHON PROGRAMMING The IPO Chart main() Input Processing Output None Ask the user to enter the month and year. As long as five time (the number of state), the following two steps should be performed:...




PYTHON PROGRAMMING The IPO Chart

















main()



Input



Processing



Output



None



Ask the user to enter the month and year.


As long as five time (the number of state), the following two steps should be performed:


Call the get_input() function to get the price


Call the stores() function to get the all sales stores in a state


Call the total() function to calculate total sales


Call the percent() function to total sales


Call the sale_ bonuss () function to calculate bonous and total bonus


Call the display () function to display result



None






IPO Chart for Function get_ input ()



















Get _input()



Input



Processing



Output



MIN_NUMBER


MAX_NUMBER


State


count



#Priming loops read w/ I/P validation


good_ data = false


while not good _data


display "Enter sales in state, -1 to stop"


input price


good_ data = MIN <><=>


if not good _data


display "Error message



price



IPO Chart for Function stores ()



















stores()



Input



Processing



Output



price


State


Count


Sale


Sale_ State



# loop to accumulate sate sales total


while price != SENTINEL


add 1 to count


add sales to state_ sales


#loop read w/ I/P validation


Good _data = false


while not good _data


display "Enter amount for state store, -1 to stop"


input sales


good_  data = MIN <><=>


if not good _data


display "Error message"



Sale



IPO Chart for Function total ()



















total()



Input



Processing



Output



Sale_ State


Total_ sale



Total_ sale+=sale_ state



Total_ sale



IPO Chart for Function percent ()



















percent()



Input



Processing



Output



Sale _State


Total _sale


Total _percent


per



per= Sale_ state/Total _sale



Total _percent


Per



IPO Chart for Function bonus ()



















bonus()



Input



Processing



Output



Sale  State


bonus


Total _bonus


Per



If per


bonus =0.01* Sale _State


If 0.1


bonus =0.03* Sale _State


If 0.2


bonus =0.05* Sale _State


else


bonus =0.08* Sale _State


Total_ bonus+=bonus



Total_ bonus


bonus



IPO Chart for Function display ()



















display()



Input



Processing



Output



Month


Year


Sale _Sate


Total _sale


Total percent


Bonus


Total_ bonus


per



#Display output


Display “Irwin Main way Toy Company Total Sales Report”


Display “For the Month of”, month, year


Display “      “


Display “State                    Total Sales          Percent of Total          Bonus Amount


Display “=====================================================”


Display ”New York           $”, sales_ NY, PERCENT_NY, bonus _ny


Display “Connecticut      $”, sales _CT, PERCENT_CT, bonus _ct


Display “Rhode Island     $”, sales  _RJ, PERCENT_RI, bonus _ri


Display “Massachusetts $”, sales _MA, PERCENT_MA bonus_ ma


Display “Massachusetts $”, sales _ver, PERCENT_VER, bonus_ v


Display “------------------------------------------------------------------------------------”


Display “Totals   $”, total _sales, total _percent, , total _bonus



None



Your program should then display the following report making sure to follow the exact format shown.(Hint: Using the data shown in the report layout below, the amount of the bonus the state of New York is equal to 0.08 times $40,000.00 which is $3,200.00)


EXPECTED OUTPUT:          Irwin Main way Toy Company Total Sales Report


                                    For the Month of October 2018


State                            Total Sales      Percent of Total           Bonus Amount


=============================================================


New York                   $ 40,000.00                 40%                 $ 3,200.00


Connecticut                 $ 29,000.00                 29%                 $ 1,450.00


Rhode Island               $   9,000.00                 9%                 $      90.00


Massachusetts             $ 12,000.00                 12%                 $    360.00


Vermont                      $ 10,000.00                 10%                 $   300.00


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


Totals                         $100,000.00               100%               $ 5, 400.00


May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here