Write a Python program to display information about a car and its fuel efficiency.
car_model
and assign it a car model name (e.g., "Toyota Corolla"
).year
and assign it the manufacturing year of the car (e.g., 2022
).mileage
and assign it the car’s mileage in miles per gallon (e.g., 35
).fuel_tank_capacity
and assign it the fuel tank capacity in gallons (e.g., 13
).print
function to display the following:"The car is a [year] [car_model]."
"It has a mileage of [mileage] miles per gallon."
"The fuel tank can hold up to [fuel_tank_capacity] gallons of fuel."
We’re always looking for international STEM educators to join our team. If you are interested, please send us a mail and we’ll get back to you!
If you have any questions, kindly send us a mail. Don’t forget to follow and like all our social accounts to get updates on competitions!