Advertisement
Guest User

Untitled

a guest
Aug 21st, 2019
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. price = 800
  2. print("Hello, thanks for purchasing this new phone")
  3. user_answer = input("Do you have good credit? ")
  4. if user_answer == "yes":
  5. down_payment = 0.0625 * price
  6. has_goodcredit = f"downpayment: ${(price * .1)}"
  7. print(f"total: ${down_payment + price}")
  8. print(f"downpayment: ${down_payment}")
  9. elif user_answer == "no":
  10. down_payment = 0.2 * price
  11. has_badcredit = f"downpayment: ${(price * .2)}"
  12. print(f"total: ${down_payment + price}")
  13. print(f"downpayment: ${down_payment}")
  14. else:
  15. print("Error: Answer must be yes or no")
  16. print("Lets try that again")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement