194k views
12 votes
Five Star Retro Video rents VHS tapes and DVDs to the same connoisseurs who like to buy LP record albums. The store rents new videos for $3.00 a night, and oldies for $2.00 a night.Write a program that the clerks at Five Star Retro Video can use to calculate the total charge for a customer’s video rentals.

User VikasGoyal
by
3.6k points

2 Answers

9 votes

Final answer:

To calculate the total charge for a customer's video rentals at Five Star Retro Video, we multiply the price per new video by the number of new videos rented, and the price per oldie by the number of oldies rented.

Step-by-step explanation:

To calculate the total charge for a customer's video rentals at Five Star Retro Video, we need to determine the number of new videos and oldies rented by the customer. Let's assume the customer rented 'n' new videos and 'm' oldies. The total charge can be calculated as follows:

Total Charge = (Price per new video x n) + (Price per oldie x m)

Using the given prices, the total charge would be $3.00 x n + $2.00 x m.

User Terje Mikal
by
3.3k points
8 votes

Final answer:

The student's question about writing a program for calculating total video rental charges can be addressed by providing a simple code snippet in a language like Python, which uses input to receive the number of new and old videos rented and calculates the total cost based on predefined rental rates.

Step-by-step explanation:

A student asked how to write a program for calculating the total charge for a customer’s video rentals at a store named Five Star Retro Video. The store rents out new videos for $3.00 a night and oldies videos for $2.00 a night. The crafted response should provide a simple program, perhaps in a language like Python, illustrating how to input the number of each type of video rented and calculate the total cost.

For example:

new_videos = int(input(“Enter the number of new videos rented: ”))
old_videos = int(input(“Enter the number of old videos rented: ”))
total_cost = (new_videos * 3) + (old_videos * 2)
print(“Total rental cost: $”, total_cost)

This program would allow the clerks at Five Star Retro Video to easily calculate the total charge by entering the number of new and old videos rented by the customer.

User Per Salmi
by
3.5k points