For those unfamiliar with the "half-your-age-plus-seven" relationship rule, your partner should be at least half your age plus seven for the relationship to be considered socially acceptable. Ideally, kids should not be pursuing serious relationships; relationships involving children are socially unacceptable. Notes: a. Assume the current year is 2021 and everyone has had his/her birthday. b. The rule should be applied to both partners in order to say that the relationship is socially acceptable. c. A child is a person whose age is twelve (12) or under. d. An adult is a person whose age is thirteen (13) or above. e. Disclaimer: this rule is not entirely accurate Input Two numbers (your birth year and your partner's birth year) Output a. The ages of the people involved b. A message for the following cases (make your own messages): Sample a. Both children (aral muna bago landi) b. Child and adult (u pedo!) c. Both adults, ages within bounds (aprub! Basta dapat safe ha.) d. Both adults, ages outside bounds (I'm judging you.) • Enter birth year of first person: 2007 Enter birth year of second person: 1982 Age of first person: 11 Age of second person: 36 u pedo!! Enter birth year of first person: 1998 • Enter birth year of second person: 1912 Age of first person: 20 Age of second person: 106 I'm judging you. • Enter birth year of first person: 1905 • Enter birth year of second person: 1954 Age of first person: 113

Operations Research : Applications and Algorithms
4th Edition
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Wayne L. Winston
Chapter19: Probabilistic Dynamic Programming
Section19.4: Further Examples Of Probabilistic Dynamic Programming Formulations
Problem 7P
icon
Related questions
Question
100%
Create a python program with this requirement:
1. For those unfamiliar with the "half-your-age-plus-seven" relationship rule, your partner
should be at least half your age plus seven for the relationship to be considered socially
acceptable.
2. Ideally, kids should not be pursuing serious relationships; relationships involving children are
socially unacceptable.
3. Notes:
Assume the current year is 2021 and everyone has had his/her birthday.
b. The rule should be applied to both partners in order to say that the relationship is
socially acceptable.
A child is a person whose age is twelve (12) or under.
d. An adult is a person whose age is thirteen (13) or above.
a.
с.
e. Disclaimer: this rule is not entirely accurate
4. Input
Two numbers (your birth year and your partner's birth year)
5. Output
a. The ages of the people involved
b. A message for the following cases (make your own messages):
6. Sample
a. Both children (aral muna bago landi)
b. Child and adult (u pedo!)
c. Both adults, ages within bounds (aprub! Basta dapat safe ha.)
d. Both adults, ages outside bounds (I'm judging you.)
Enter birth year of first person: 2007
Enter birth year of second person: 1982
Age of first person: 11
Age of second person: 36
u pedo!!
Enter birth year of first person: 1998
Enter birth year of second person: 1912
Age of first person: 20
Age of second person: 106
I'm judging you.
Enter birth year of first person: 1905
Enter birth year of second person: 1954
Age of first person: 113
Age of second person: 64
aprub! Basta dapat safe ha.
Transcribed Image Text:1. For those unfamiliar with the "half-your-age-plus-seven" relationship rule, your partner should be at least half your age plus seven for the relationship to be considered socially acceptable. 2. Ideally, kids should not be pursuing serious relationships; relationships involving children are socially unacceptable. 3. Notes: Assume the current year is 2021 and everyone has had his/her birthday. b. The rule should be applied to both partners in order to say that the relationship is socially acceptable. A child is a person whose age is twelve (12) or under. d. An adult is a person whose age is thirteen (13) or above. a. с. e. Disclaimer: this rule is not entirely accurate 4. Input Two numbers (your birth year and your partner's birth year) 5. Output a. The ages of the people involved b. A message for the following cases (make your own messages): 6. Sample a. Both children (aral muna bago landi) b. Child and adult (u pedo!) c. Both adults, ages within bounds (aprub! Basta dapat safe ha.) d. Both adults, ages outside bounds (I'm judging you.) Enter birth year of first person: 2007 Enter birth year of second person: 1982 Age of first person: 11 Age of second person: 36 u pedo!! Enter birth year of first person: 1998 Enter birth year of second person: 1912 Age of first person: 20 Age of second person: 106 I'm judging you. Enter birth year of first person: 1905 Enter birth year of second person: 1954 Age of first person: 113 Age of second person: 64 aprub! Basta dapat safe ha.
Expert Solution
steps

Step by step

Solved in 3 steps with 6 images

Blurred answer
Knowledge Booster
ADT and Class
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.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Operations Research : Applications and Algorithms
Operations Research : Applications and Algorithms
Computer Science
ISBN:
9780534380588
Author:
Wayne L. Winston
Publisher:
Brooks Cole
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr