The CAOC Insurance Company working on insurance of vehicles in Oman. They are currently providing insurance for two types of vehicle. Write a Python program for the company to calculate depreciation cost for a vehicle. Your program has to ask the user to input the vehicle type, life of vehicle in years and vehicle cost and calculates the depreciation cost according to the following table: - Life of Vehicle Rate of Vehicle Type In years 1s vehiclelife < 10 10 s vehiclelife < 15 15 s vehiclelife 1s vehiclelife < 8 8s vehiclelife < 12 12 < vehiclelife Depreciation 10% commercial 8% 5% 12% private 9% 6% The depreciation cost is calculated based on the following formula: Depreciation Cost = Vehicle Cost * Rate of Depreciation / Life of Vehicle The input/output of your program should look like the following: .: private : 5000 : 4 Enter Vehicle Type Enter Vehicle Cost . . Enter Life Vehicle(years). Depreciation Cost(OMR) . : 150.0 Run and test your program. Once done, submit the file named insurance.py at the link below.
Operations
In mathematics and computer science, an operation is an event that is carried out to satisfy a given task. Basic operations of a computer system are input, processing, output, storage, and control.
Basic Operators
An operator is a symbol that indicates an operation to be performed. We are familiar with operators in mathematics; operators used in computer programming are—in many ways—similar to mathematical operators.
Division Operator
We all learnt about division—and the division operator—in school. You probably know of both these symbols as representing division:
Modulus Operator
Modulus can be represented either as (mod or modulo) in computing operation. Modulus comes under arithmetic operations. Any number or variable which produces absolute value is modulus functionality. Magnitude of any function is totally changed by modulo operator as it changes even negative value to positive.
Operators
In the realm of programming, operators refer to the symbols that perform some function. They are tasked with instructing the compiler on the type of action that needs to be performed on the values passed as operands. Operators can be used in mathematical formulas and equations. In programming languages like Python, C, and Java, a variety of operators are defined.
Step by step
Solved in 4 steps with 2 images