Difference between revisions of "MPAA calculator assignment"
From WLCS
(New page: '''Objective:''' * You will create a program that prompts the user for his/her age and the rating for the movie he/she wishes to see. Your program will then display whether or not they ca...) |
|||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
'''Objective:''' | '''Objective:''' | ||
− | * You will create a program that prompts the user for his/her age | + | * You will create a program that prompts the user for his/her age. Your program will then display whether or not they can watch the movie. |
'''Resources:''' | '''Resources:''' | ||
− | * [http://www.mpaa.org/ | + | * [http://www.mpaa.org/film-ratings/ MPAA Ratings] |
'''Directions:''' | '''Directions:''' | ||
+ | # Prompt the user for his/her age | ||
+ | # Use if-statements to check his/her age and print out which ratings they can see | ||
+ | #* G: General Audiences (any age) | ||
+ | #* PG: Parental Guidance Suggested (any age) | ||
+ | #* PG-13: Parents Strongly Cautioned (ages 13+, unless accompanied by an adult) | ||
+ | #* R: Restricted (ages 17+, unless accompanied by an adult) | ||
+ | #* NC-17: No one 17 or Under Admitted (>17) | ||
+ | |||
+ | '''Examples:''' | ||
+ | <pre> | ||
+ | Please enter your age: 5 | ||
+ | |||
+ | You may view the following movies: | ||
+ | G: General Audiences | ||
+ | PG: Parental Guidance Suggested | ||
+ | PG-13: Parents Strongly Cautioned (w/ an adult) | ||
+ | |||
+ | --- | ||
+ | |||
+ | Please enter your age: 14 | ||
+ | |||
+ | You may view the following movies: | ||
+ | G: General Audiences (any age) | ||
+ | PG: Parental Guidance Suggested (any age) | ||
+ | PG-13: Parents Strongly Cautioned | ||
+ | R: Restricted (w/ an adult) | ||
+ | |||
+ | --- | ||
+ | |||
+ | Please enter your age: 28 | ||
+ | |||
+ | You may view the following movies: | ||
+ | G: General Audiences (any age) | ||
+ | PG: Parental Guidance Suggested (any age) | ||
+ | PG-13: Parents Strongly Cautioned | ||
+ | R: Restricted | ||
+ | NC-17: No one 17 or Under Admitted (17+) |
Latest revision as of 09:21, 12 September 2014
Objective:
- You will create a program that prompts the user for his/her age. Your program will then display whether or not they can watch the movie.
Resources:
Directions:
- Prompt the user for his/her age
- Use if-statements to check his/her age and print out which ratings they can see
- G: General Audiences (any age)
- PG: Parental Guidance Suggested (any age)
- PG-13: Parents Strongly Cautioned (ages 13+, unless accompanied by an adult)
- R: Restricted (ages 17+, unless accompanied by an adult)
- NC-17: No one 17 or Under Admitted (>17)
Examples:
Please enter your age: 5 You may view the following movies: G: General Audiences PG: Parental Guidance Suggested PG-13: Parents Strongly Cautioned (w/ an adult) --- Please enter your age: 14 You may view the following movies: G: General Audiences (any age) PG: Parental Guidance Suggested (any age) PG-13: Parents Strongly Cautioned R: Restricted (w/ an adult) --- Please enter your age: 28 You may view the following movies: G: General Audiences (any age) PG: Parental Guidance Suggested (any age) PG-13: Parents Strongly Cautioned R: Restricted NC-17: No one 17 or Under Admitted (17+)