Write the python program that finds the total fuel cost of the vehicle according to the amount of fuel spent per km entered on the keyboard, the price per liter of fuel and the total km made by the vehicle. Example: Fuel consumption per km (lt) 0.1 Price of 1 liter of fuel (YTL) 2.080 The total distance covered by the vehicle (km) 1000 --------------------------------- Total fuel cost 108 YTL

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

1)Write the python program that finds the total fuel cost of the vehicle according to the amount of fuel spent per km entered on the keyboard, the price per liter of fuel and the total km made by the vehicle.

Example:

Fuel consumption per km (lt) 0.1

Price of 1 liter of fuel (YTL) 2.080

The total distance covered by the vehicle (km) 1000

---------------------------------

Total fuel cost 108 YTL

 

2) In Python Suppose that among the four (4) digit (abcd) positive integers, those that have the property of multiplying the first two digits and the last two digits, equaling the product of the substituted form of their digits (ab * cd = ba * dc), are called Inverted Numbers. Write the program that says whether a 4-digit number entered from the keyboard is a Reverse Number.

For example, the number 1242 is an Inverted number. 12 * 42 = 21 * 24

EXAMPLE 1:

Enter the four-digit number: 6213

------------------------------------

The number entered is an Inverted number

EXAMPLE 2:

Enter the four-digit number: 1234

------------------------------------

The number entered is not an inverted number

Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Similar questions
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY