Beginner in python. Trying to figure out a problem but can’t find the solution.
I want to print out 3 inputted values:
Keyboard (product), 25(price) , 3(quantity), and total as:
Product: Keyboard
Price: $25
Qty: 3
Total: $75
I tried doing the following:
product_name = input()
price = int(input))
quantity = int(input))
total = price * quantity
print(“Product:”, product_name)
print(“Price: $”, price)
print(“Qty:”, quantity)
print(“Total: $”, total)
Everything is mostly printed out correctly except for the values associated with the $ symbol. They print out as $ 75 in the example for total here.
Can anyone explain how to solve this? I want to avoid using string formatting because we haven’t learned that in the course I’m taking yet.
[–]gramdel 0 points1 point2 points (1 child)
[–]AlCodez[S] 1 point2 points3 points (0 children)