You just need a little bit of math to solve this. Add up the items and see which one would be equal to $55.00 or less.
A = $59.90 so this is not the answer
B = $60.94 so this is not the answer
C = $55.99 so this is not the answer
D = $50.97
D is the correct answer.
Answer:
The program to this question can be given as:
Program:
factorial=1 #declare a variable.
number=int(input("Enter a positive integer:")) #input a number.
while (number>0): #loop
factorial= factorial*number # holding value in factorial variable
number=number-1
print('=',factorial) #print value.
Output:
Enter a positive integer:6
= 720
Explanation:
The description of the above python program can be given as:
- In the above program firstly we define a variable that is "factorial". In this variable, we assign a value that is 1 and it is used to calculate the factorial value.
- We define a variable "number". The number variable is used to take input from the user.
- Then we define a loop in the loop we calculate the factorial and hold the value in the factorial value in the last we print the value.
Record our dream.
Since it is from the future and advanced, it is invalid to argue back that the wish to record our dreams cannot be fulfilled.
From here you can elaborate more ...