1. Repeatedly prompt the user to enter positives numbers. 2. Keep track of the largest even number entered by the user? Hint: How do you know if a number is even? Any number modulus two that results in a 0 is an even number. For example: 5 % 2 = 1 (odd), 4 % 2 = 0 (even), 12 %2 = 0 (even), 101%2=1 (odd) 3. When the user enters a negative number, stop and print out the largest even number entered. 4. If the user does not enter an even number, output 0 as the output. See output for coveral ovamplos lucer innut is in red)

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Python code easy way please

Goal: The goal is to find the maximum even number from a sequence of positive numbers entered by the user.
Stop prompting the user for numbers after they enter a negative number.
1. Repeatedly prompt the user to enter positives numbers.
2. Keep track of the largest even number entered by the user?
Hint: How do you know if a number is even? Any number modulus two that results in a 0 is an even
number.
For example: 5 % 2 = 1 (odd), 4 % 2 = 0 (even), 12 %2 = 0 (even), 101%2=1 (odd)
3. When the user enters a negative number, stop and print out the largest even number entered.
4. If the user does not enter an even number, output 0 as the output.
See output for several examples (user input is in red)
--- Task 3 ---: The maximum *even* number
Keep entering positive integer
To quit, input a negative integer
Enter a number: 10
Enter a number: 11
Enter a number: 103
Enter a number: 99
Enter a number: 88
Enter a number: -1
Largest even number: 88
Transcribed Image Text:Goal: The goal is to find the maximum even number from a sequence of positive numbers entered by the user. Stop prompting the user for numbers after they enter a negative number. 1. Repeatedly prompt the user to enter positives numbers. 2. Keep track of the largest even number entered by the user? Hint: How do you know if a number is even? Any number modulus two that results in a 0 is an even number. For example: 5 % 2 = 1 (odd), 4 % 2 = 0 (even), 12 %2 = 0 (even), 101%2=1 (odd) 3. When the user enters a negative number, stop and print out the largest even number entered. 4. If the user does not enter an even number, output 0 as the output. See output for several examples (user input is in red) --- Task 3 ---: The maximum *even* number Keep entering positive integer To quit, input a negative integer Enter a number: 10 Enter a number: 11 Enter a number: 103 Enter a number: 99 Enter a number: 88 Enter a number: -1 Largest even number: 88
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education