Project3 The goal of this activity is to create a program that identifies the largest number among three numbers and checks if it is a multiple of other numbers. Part 1 - Create a header comment with the title of this program, your name, and the date. Part 2 (Taking in user input) Part 2 - Ask the user for three integer numbers. You can assume that the user will always only give three integer numbers. Once you run your program, the questions for the user should be formatted as follows: Please enter the first number: 99 Please enter the second number: 55 Please enter the third number: 22 Part 3 (Finding out the largest number) Bob, Alice, and Amy are siblings. Each of them has one candy. The first input number is Bob's candy size, the second input number is Alice's candy size, and the third input number is Amy's candy size. If any of the candy sizes is negative or zero, print "Invalid size". The following operations will not proceed in this case. ● If all the candy sizes are positive, Print the largest candy size. Part 4 For the largest candy only- If the candy size is a multiple of 2, check if the candy size is not a multiple of 3, then the person is "happy" If the candy size is a multiple of both 2 and 3, check if the candy size is a multiple of 5 or 7, then the person is "super happy" Otherwise, the person is "very happy" For all other cases, the person is "sad"

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

Can you use Python to solve this problem? Thanks.

Project3
The goal of this activity is to create a program that identifies the largest number among
three numbers and checks if it is a multiple of other numbers.
Part 1 - Create a header comment with the title of this program, your name, and the date.
Part 2 (Taking in user input)
Part 2 - Ask the user for three integer numbers. You can assume that the user will always only
give three integer numbers. Once you run your program, the questions for the user should be
formatted as follows:
Please enter the first number: 99
Please enter the second number: 55
Please enter the third number: 22
Part 3 (Finding out the largest number)
Bob, Alice, and Amy are siblings. Each of them has one candy. The first input number is Bob's
candy size, the second input number is Alice's candy size, and the third input number is Amy's
candy size.
If any of the candy sizes is negative or zero, print "Invalid size". The following operations
will not proceed in this case.
If all the candy sizes are positive, Print the largest candy size.
Part 4
For the largest candy only-
If the candy size is a multiple of 2,
check if the candy size is not a multiple of 3, then the person is "happy"
If the candy size is a multiple of both 2 and 3,
check if the candy size is a multiple of 5 or 7, then the person is "super happy"
Otherwise, the person is "very happy"
For all other cases, the person is "sad"
Transcribed Image Text:Project3 The goal of this activity is to create a program that identifies the largest number among three numbers and checks if it is a multiple of other numbers. Part 1 - Create a header comment with the title of this program, your name, and the date. Part 2 (Taking in user input) Part 2 - Ask the user for three integer numbers. You can assume that the user will always only give three integer numbers. Once you run your program, the questions for the user should be formatted as follows: Please enter the first number: 99 Please enter the second number: 55 Please enter the third number: 22 Part 3 (Finding out the largest number) Bob, Alice, and Amy are siblings. Each of them has one candy. The first input number is Bob's candy size, the second input number is Alice's candy size, and the third input number is Amy's candy size. If any of the candy sizes is negative or zero, print "Invalid size". The following operations will not proceed in this case. If all the candy sizes are positive, Print the largest candy size. Part 4 For the largest candy only- If the candy size is a multiple of 2, check if the candy size is not a multiple of 3, then the person is "happy" If the candy size is a multiple of both 2 and 3, check if the candy size is a multiple of 5 or 7, then the person is "super happy" Otherwise, the person is "very happy" For all other cases, the person is "sad"
Print the happiness status for the largest candy only.
Hint: Number "a" is a multiple of number "b" if a%b equals zero.
Sample Test Cases:
Please enter the first number: 2
Please enter the second number: 3
Please enter the third number: 4
The largest candy size is: 4
Amy is happy
Please enter the first number: 201
Please enter the second number: 210
Please enter the third number: 10
The largest candy size is: 210
Alice is super happy
Please enter the first number: 18
Please enter the second number: 10
Please enter the third number: 8
The largest candy size is: 18
Bob is very happy
Transcribed Image Text:Print the happiness status for the largest candy only. Hint: Number "a" is a multiple of number "b" if a%b equals zero. Sample Test Cases: Please enter the first number: 2 Please enter the second number: 3 Please enter the third number: 4 The largest candy size is: 4 Amy is happy Please enter the first number: 201 Please enter the second number: 210 Please enter the third number: 10 The largest candy size is: 210 Alice is super happy Please enter the first number: 18 Please enter the second number: 10 Please enter the third number: 8 The largest candy size is: 18 Bob is very happy
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 5 images

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

How will it archive "If any of the candy sizes is negative or zero, print 'Invalid size'. The following operations will not proceed in this case." ?

Please enter the first number: 30
Please enter the second number: 10
Please enter the third number: 4
The largest candy size is: 30
Bob is super happy
Please enter the first number: 10
Please enter the second number: 49
Please enter the third number: 30
The largest candy size is: 49
Alice is sad
Please enter the first number: 0
Please enter the second number: 10
Please enter the third number: 20
Invalid size
Please enter the first number: 0
Please enter the second number: 0
Please enter the third number: 0
Invalid size
Please enter the first number: -20
Please enter the second number: 3
Please enter the third number: 2
Invalid size
Transcribed Image Text:Please enter the first number: 30 Please enter the second number: 10 Please enter the third number: 4 The largest candy size is: 30 Bob is super happy Please enter the first number: 10 Please enter the second number: 49 Please enter the third number: 30 The largest candy size is: 49 Alice is sad Please enter the first number: 0 Please enter the second number: 10 Please enter the third number: 20 Invalid size Please enter the first number: 0 Please enter the second number: 0 Please enter the third number: 0 Invalid size Please enter the first number: -20 Please enter the second number: 3 Please enter the third number: 2 Invalid size
Solution
Bartleby Expert
SEE SOLUTION
Knowledge Booster
Block Comments
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
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