Common Computer Science References
At the end of this lesson, you will be able to:
understand and use a compound boolean statement
try catch statements
watch video below
choose 1 of the following 2 programs to do; you MUST use a compound boolean expression:
A) Imagine a grandmother #1 who will only approve you dating her grandchild if you are older than 25 and younger than 40. Write a program where the user enters in their age and then the program tells you if you can date her grandchild.(since you are getting the user to enter numbers, you will need a try ... catch to prevent errors)
B) Imagine a grandmother #2 who will only approve you dating her grandchild if you are either rich or really good looking. Write a program where the user enters these 2 pieces of information (maybe as a "yes" or "no" answer) and then the program tells you if you can date her grandchild.(since you are just asking to "string" input, you will not use a try ... catch but if ... to trap errors)
read Compound Boolean Expressions , Computer Based Problem Solving
recreate the same above program in C
NOTE: You can turn on "Closed Captions" to see a printout of what is being said by selecting the "CC" button.
You can also have it translate the closed captions by going to "Settings, Subtitles/CC, Auto-translate" and then pick your prefered language.