MIS 304 Lecture Notes - Lecture 4: Boolean Algebra
Document Summary
Decision structures and boolean logic part 2. Practice comparing strings and using nested decision structures. You can compare strings using all relational operators. Check for relative values (useful for sorting): . Comparisons made by examining ascii values of characters. Logical operators allow us to create compound boolean expressions. Assume the following values have been assigned to these variables: Prompt the user to enter their gender and ethnicity. Print whether or not the user is eligible for the scholarship. You are not eligible for the scholarship. blame your parents. Allows us to test more than one condition. Statement(s) else : If they are ineligible due to age, . If they are ineligible due to citizenship, enough to vote a us citizen. If they are ineligible due to their felon status, . If they are eligible to vote, print a message telling them to go vote are a convicted felon. Prompt the user to enter their numerical grade (e. g. 92. 5)