Phạm Hồng Anh
Giới thiệu về bản thân
# Step 1: Input the weight (khối lượng) from the user
weight = float(input("Nhập số lượng cam khách mua (kg): "))
# Step 2: Use an if-else statement to determine the price
if weight < 5:
price_per_kg = 20000
else:
price_per_kg = 18000
# Step 3: Calculate the total cost
total_cost = weight * price_per_kg
# Step 4: Display the result
print (f'Số tiền khách phải trả là: {total_cost} đồng")
# Step 1: Input the weight (khối lượng) from the user
weight = float(input("Nhập số lượng cam khách mua (kg): "))
# Step 2: Use an if-else statement to determine the price
if weight < 5:
price_per_kg = 20000
else:
price_per_kg = 18000
# Step 3: Calculate the total cost
total_cost = weight * price_per_kg
# Step 4: Display the result
print (f'Số tiền khách phải trả là: {total_cost} đồng")
# Step 1: Input the weight (khối lượng) from the user
weight = float(input("Nhập số lượng cam khách mua (kg): "))
# Step 2: Use an if-else statement to determine the price
if weight < 5:
price_per_kg = 20000
else:
price_per_kg = 18000
# Step 3: Calculate the total cost
total_cost = weight * price_per_kg
# Step 4: Display the result
print (f'Số tiền khách phải trả là: {total_cost} đồng")