Respuesta :
The program is an illustration of built-in functions and conditional statements.
Built-in functions are functions that have specific roles defined in them, while conditional statements are statements whose execution depends on the truth values of the condition.
The program in Python, where comments are used to explain each line is as follows:
import math
#This prints the menu
print("Menu\n1.- Silver plan\n2. Gold plan")
#This gets input for the plan from the user
selection = int(input("Select a plan: "))
#This gets the additional data from the user
additional_data = float(input("Additional data: "))
#This rounds up the additional data to the next integer
additional_data = math.ceil(additional_data)
#If selection is 1
if selection == 1:
#This calculates the additional cost and the total cost
additional_cost = 10 * additional_data
total = additional_cost + 29.99
#If selection is 2
elif selection == 2:
#This calculates the additional cost and the total cost
additional_cost = 5 * additional_data
total = additional_cost + 49.99
#For other inputs, the selection is considered invalid
else:
print("Invalid selection")
#This prints the additional and the total costs, for selections 1 and 2
if selection == 1 or selection == 2:
print("Additional cost:",additional_cost)
print("Total cost: {:.2f}".format(total))
At the end of the program, the appropriate costs are printed for valid selections.
Read more about similar programs at:
https://brainly.com/question/25210352