The_Ideas

profilegnnv_eklter

Key Assignment

The deliverable will be a Word document with screenshots of the following (one screenshot is fine if it can cover both code and output):

  • Code within PyCharm IDE
  • Output of code execution within Python console by executing the code
    • Your output for each assignment should run through one path of the code until completion.
    • You do not have to send screenshots for all of the possible execution paths of the code.
    • You choose the output path that you will take by responding to the Python screen requests as your code executes.

Click here to seen an example of the output screen saved in a Word document. Click here to see instructions on how to do a screenshot using either your keyboard or the Windows snipping tool (Windows OS version 7 or later).

In the final phase of the Key Assignment, the Unit 4 scenario is expanded so that a for loop (or while loop) is used to input any amount of items. The user will be asked how many items he or she wishes to purchase. You will continue to code the program so that it uses a for loop (or while loop) to do the following:

  • Input the price of each item
  • Add up the costs of the items

Then, the code will update the debit card to reflect the purchase of the items. If the frequent shopper debit card balance falls below zero, the user will be asked for additional funds to be added to the card. Once the user deposits additional funds to the account, the final debit card balance will be displayed.

Save the file as “yourname_IP5.docx.”

    • 10 years ago
    • 20
    Answer(0)