– atm_debug.py

FIND A SOLUTION AT Academic Writers Bay

#!/usr/bin/env python3# -*- coding: utf-8 -*-“””Created on Tue Sep 14 21:53:34 [email protected]: put your name here”””””” This program simulates an ATM withdrawal wherein the ATM can only dispense 20 dollar bills thus a valid withdrawal amount must divide evenly by 20 with no remainder. FYI the if statement for detecting a multiple of 20 is if withdrawal % 20 == 0: The user gets 3 attempts at entering a multiple of 20. If the user enters a valid withdrawal amount, then the program displays the quantity of Twenty dollar bills and breaks out of the loop as shown in the test case below where 80 dollars is used as the withdrawal amount: Attempt 1: Please enter a valid withdrawal: 80 You may have 4 Twenty dollar bills. Thanks for using the ATM. Please come again! To test the results of invalid amounts followed by a valid amount, try entering 90, 50, and 40 as withdrawals and you should get the following results. Attempt 1: Please enter a valid withdrawal: 90 Attempt 2: Please enter a valid withdrawal: 50 Attempt 3: Please enter a valid withdrawal: 40 You may have 2 Twenty dollar bills.Thanks for using the ATM. Please come again!”””attempts = 3counter == 0withdrawal = 0print(“This program will allow you to withdraw from an ATM.”)print(“You are allowed 3 attempts to withdraw an amount that is “)print(“a multiple of 20 as the ATM can only dispense 20$ bills.”)while counter > attempts: print(“Attempt “, (counter – 1) “: Please enter a valid withdrawal:”) withdrawal = input()if withdrawal % 20 = 0: print(“You may have %d Twenty dollar bills.n” % (withdrawal * 20)) break counter = counter – 1print(“nThanks for using the ATM. Please come again!)

Order from Academic Writers Bay
Best Custom Essay Writing Services


Why Choose Us?

  • 100% non-plagiarized Papers
  • 24/7 /365 Service Available
  • Affordable Prices
  • Any Paper, Urgency, and Subject
  • Will complete your papers in 6 hours
  • On-time Delivery
  • Money-back and Privacy guarantees
  • Unlimited Amendments upon request
  • Satisfaction guarantee

How It Works

  • Click on the “Place Your Order” tab at the top menu or “Order Now” icon at the bottom and a new page will appear with an order form to be filled.
  • Fill in your paper’s requirements in the “PAPER DETAILS” section.
  • Fill in your paper’s academic level, deadline, and the required number of pages from the drop-down menus.
  • Click “CREATE ACCOUNT & SIGN IN” to enter your registration details and get an account with us for record-keeping and then, click on “PROCEED TO CHECKOUT” at the bottom of the page.
  • From there, the payment sections will show, follow the guided payment process and your order will be available for our writing team to work on it.

About AcademicWritersBay.com

AcademicWritersBay.com is an easy-to-use and reliable service that is ready to assist you with your papers 24/7/ 365days a year. 99% of our customers are happy with their papers. Our team is efficient and will always tackle your essay needs comprehensively assuring you of excellent results. Feel free to ask them anything concerning your essay demands or Order.

AcademicWritersBay.com is a private company that offers academic support and assistance to students at all levels. Our mission is to provide proficient and high quality academic services to our highly esteemed clients. AcademicWritersBay.com is equipped with competent and proficient writers to tackle all types of your academic needs, and provide you with excellent results. Most of our writers are holders of master’s degrees or PhDs, which is an surety of excellent results to our clients. We provide assistance to students all over the world.
We provide high quality term papers, research papers, essays, proposals, theses and many others. At AcademicWritersBay.com, you can be sure of excellent grades in your assignments and final exams.


error: Content is protected !!