MIS 304 Lecture Notes - Lecture 4: Boolean Algebra

40 views5 pages

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)

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents