Question: Hi, I am new to Python programming and I am trying to figure out the answer to this question. Write a program that asks the

Hi,

I am new to Python programming and I am trying to figure out the answer to this question.

Write a program that asks the user to input 5 decimal numbers, and then prints the last number that is a multiple of 0.2. If no number is a multiple of 0.2, it should print a message to that effect.

Explanation:

The program should accept a decimal number input five times. Once the user types in five decimal numbers, the program should output the last decimal number that is a multiple of 0.2

Example"

Enter a decimal number:

Input 1 - 1.1

Input 2 - 1.2

Input 3 - 1.3

Input 4 - 1.4

Input 5 - 1.5

Expected output:

The last decimal number input that is a multiple of 0.2 is 1.4

Furthermore,

If my inputs were all odd numbers and none of them were a multiple of 0.2, then it should print

"None of the input numbers is a multiple of 0.2"

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!