Question 7: Input Sneaker Drop Checkout

👟 Sneaker Drop Checkout

Use: import task_input_07

Jordan is grabbing a pair of limited-edition sneakers before they sell out. He needs to know if he has enough money left after buying them and adding a pair of socks. Write a Python program that collects his info and checks his wallet.

  • Use input("What is your name? ") to ask for his name. Store it in name.
  • Use input("How many sneakers? ") to ask how many pairs he wants. Store the answer in sneakers_text.
  • Convert sneakers_text to an integer using int() and store it in sneakers.
  • Use input("Sneaker price? ") to ask the price of one pair. Store it in sneaker_price_text.
  • Convert sneaker_price_text to an integer using int() and store it in sneaker_price.
  • Use input("Money in wallet? ") to ask how much cash he has. Store it in money_text.
  • Convert money_text to an integer using int() and store it in money.
  • Store the price of socks in sock_price and set it to 5.
  • Calculate the total sneaker cost and store it in sneaker_total using sneakers * sneaker_price.
  • Calculate the complete bill (sneakers + socks) and store it in total_bill using sneaker_total + sock_price.
  • Calculate the money left over and store it in money_left using money - total_bill.
  • Print exactly two lines:
    Name: <name>
    Money left: <money_left>
Write what you are looking for, and press enter to begin your search!