HW2_ISE135 (1).py - coding utf-8 Created on Sun Sep 8 20:09:53 [email protected] mtperry2"Micah Perry"P2.33#get the users inpuit PHONE_NUMBER = input"Enter

HW2_ISE135 (1).py - coding utf-8 Created on Sun Sep 8...

  • No School
  • AA 1
  • 2

This preview shows page 1 - 2 out of 2 pages.

# -*- coding: utf-8 -*- """ Created on Sun Sep 8 20:09:53 2019 @author: mtperry2 ""Micah Perry"" """ "P2.33" #get the users inpuit: PHONE_NUMBER = input("Enter Your Phone Number: ") #slpit off the first three numbers and seperate them with parentheses: finalNumber = "(" + PHONE_NUMBER[0] + PHONE_NUMBER[1]+ PHONE_NUMBER[2] +")" # sepperate the next three digits by putting them before a hypen finalNumber += PHONE_NUMBER[3] + PHONE_NUMBER[4] + PHONE_NUMBER[5] + "-" #Place last 4 digits after the hypen finalNumber += PHONE_NUMBER[6] + PHONE_NUMBER[7] + PHONE_NUMBER[8] + PHONE_NUMBER[9] print("Phone Number:",finalNumber) "P2.35" #get the amount due and the amount given as inputs AMOUNT_DUE = float(input("Enter Total Amount Due: $")) AMOUNT_GIVEN = float(input("Enter Amount Given To Cahhier: $")) #Find the total amount of change the customer is owed changeAmount = (AMOUNT_GIVEN - AMOUNT_DUE) #convert change due into cents CENTS_DUE = int(AMOUNT_DUE * 100 +.5) #convert change given into cents CENTS_GIVEN = int(AMOUNT_GIVEN * 100 +.5) # find the change in cents CHANGE_INCENTS = CENTS_GIVEN - CENTS_DUE #Find the number of dollars given back
Image of page 1

Subscribe to view the full document.

Image of page 2
  • Fall '19
  • Psychrometrics, dimes, Enter Total Amount Due

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask 0 bonus questions You can ask 0 questions (0 expire soon) You can ask 0 questions (will expire )
Answers in as fast as 15 minutes