Write a python program that will calculate and display the miscellaneous fee and total fee of a course.

The program will ask about the course fee.
Miscellaneous fee is 5% of the course fee.

Respuesta :

Following are the Python program to calculate "Miscellaneous fee" and the total fees:

Program Explanation:

  • Defining a variable "Fee", that inputs integer value from the user-end.
  • In the next step, another variable "MFee" is declared that calculates 5% tax (Miscellaneous fee) on the Fee.
  • After calculating the "Miscellaneous fee" another variable "totalFee" is declared that adds "Fee + MFee".
  • At the last step, two print method is declared that prints the taxable fee (Miscellaneous fee) and total fees.

Program:

Fee = float(input("Enter your course fee: "))#defining a Fee variable that inputs value

MFee = (5.0/100) * Fee#defining MFee that calculates 5% of tax on Fee

totalFee = Fee + MFee#defining totalFee variable that calculates total fees that includes tax  

print("Miscellaneous Fee: ","%.2f"%MFee)#print taxable fee

print("Total Fee of Course: ","%.2f"%totalFee)#print total Fees

Output:

Please find the attachment file.

Learn more:

brainly.com/question/8950747

Ver imagen codiepienagoya
ACCESS MORE