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"
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
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"](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F2bdda45c-647a-4dc4-b729-607d761f96c7%2F9c831350-11e3-41c1-911a-f62abe8b044d%2F6w9mpeb_processed.jpeg&w=3840&q=75)
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](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F2bdda45c-647a-4dc4-b729-607d761f96c7%2F9c831350-11e3-41c1-911a-f62abe8b044d%2Fld4uek_processed.jpeg&w=3840&q=75)
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
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 5 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
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](https://content.bartleby.com/qna-images/question/2bdda45c-647a-4dc4-b729-607d761f96c7/671d0204-ce0b-4c43-9b43-bfe0360305b7/kd1kd4l_thumbnail.jpeg)
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
Knowledge Booster
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](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
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)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
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)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education