This Python program reads the number of items and the price of each item from the user, then calculates the total sales amount.
The calculation is based on the formula:
Sales Amount = Quantity × Unit Price
# Read inputs from user
count = int(input("Enter the number of items: "))
price = float(input("Enter the price per item: "))
# Calculate total sales amount
total = count * price
# Display result
print("\n--- Result ---")
print(f"Total sales amount: {total} units")
Enter the number of items: 5
Enter the price per item: 12000
--- Result ---
Total sales amount: 60000 units
- The user provides two inputs: item count (integer) and unit price (float)
- The program multiplies these values to calculate the total
- The result is displayed clearly and numerically