1 / 19

Selection Structure Conditional and Compound Conditional Expressions

Selection Structure Conditional and Compound Conditional Expressions. Notice the following advertisement: Country Fried Steak Breakfast $4.99 Includes 2 Eggs (any Style), Country Fried Steak and Gravy, Grits or Breakfast Potatoes, Toast or Biscuits, and Fruit Jelly….

Download Presentation

Selection Structure Conditional and Compound Conditional Expressions

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Selection Structure Conditional and Compound Conditional Expressions

  2. Notice the following advertisement: Country Fried Steak Breakfast $4.99 Includes 2 Eggs (any Style), Country Fried Steak and Gravy, Grits or Breakfast Potatoes, Toast or Biscuits, and Fruit Jelly…

  3. Includes 2 Eggs (any Style), Country Fried Steak and Gravy, Grits or Breakfast Potatoes, Toast or Biscuits, and Fruit Jelly… Can you get Eggs, Steak, & Gravy, Grits and potatoes and toast and biscuit and jelly ?

  4. Includes 2 Eggs (any Style), Country Fried Steak and Gravy, Grits or Breakfast Potatoes, Toast or Biscuits, and Fruit Jelly… Not unless you wish to pay extra !!!

  5. Includes 2 Eggs (any Style), Country Fried Steak and Gravy, Grits or Breakfast Potatoes, Toast or Biscuits, and Fruit Jelly… What can we get for $4.99 ?

  6. Includes 2 Eggs (any Style), Country Fried Steak and Gravy, Grits or Breakfast Potatoes, Toast or Biscuits, and Fruit Jelly… Eggs Steak AND Gravy Grits OR Potatoes Toast OR Biscuts Fruit Jelly

  7. This is an example of logical reasoning For Example: All men are mortal Socrates was a man Therefore, Socrates was mortal

  8. In General, a statement is a declarative sentence that can be classified as TRUE or FALSE but not both at the same time Boston is the capitol of Massachusetts The number 2 is even and less than 20 If 2 is even, then 2 + 2 is also even

  9. The number 2 is even and less than 20 This is a compound statement as the ENTIRE statement is only TRUE if BOTH parts of the statement are true 2 MUST be an even number AND It must be less than 20

  10. A compound statement that utilizes AND can only be true if ALL parts of the statement are true Ann is passing Math AND she is passing English This statement can only be TRUE is Ann is in fact passing both Math and English

  11. A compound statement that utilizes OR can be true if ANY part of the statement is true We need to stop inflation OR increase wages This statement is TRUE if inflation is stopped OR wages are increased

  12. Negation reverses the initial meaning of a statement Today is Friday (Negated) Today is NOT Friday

  13. Negate the following statements: All of us like pistachio nuts Nobody likes freezing water Some students work part time

  14. Examples: You are a full time student OR You are over 21 AND You are a resident of the State How do we interpret this statement ?

  15. Based on the following, how can we use Windows Control Panel: Some of the things you can use Control Panel for are changing your screen colors, installing or changing settings for hardware and software, and setting up or changing settings for a network.

  16. Make a compound statement from the following: To apply for the job, you must be at least 25 years of age An applicant must be a college graduate

  17. Make a compound statement from the following: You may only renew your drivers license if you are a safe driver, have no physical disability, and are not addicted to drugs or intoxicants

  18. Make a compound statement from the following: You may classify yourself as Single on your tax return if any of the following are true: You are not married You are legally seperated You were widowed before Jan 1 and did not remarry

  19. Evaluate this statement: If your tax return is more than 60 days late, the minimum penalty will be $100 or the amount of any tax you owe, whichever is smaller

More Related