Textbook Notes (363,177)
ITM 200 (25)
Chapter 5

# Chapter 5

5 Pages
116 Views

School
Ryerson University
Department
Information Technology Management
Course
ITM 200
Professor
Semester
Summer

Description
Chapter 5 The if-else statement 5.1 An exam-mark recording problem If some students have been given their marks for an exam (out of 100) and need to know whether they have passed (scored 40 or more) You would have to write the following pseudoccode first o 1. Get the mark from the student o 2. IF it is greater than the pass mark, tell them they have passed ELSE tell them they have failed o 3. Thank them for using the system 5.2 Boolean expressions A Boolean expression is one which evaluates to a Boolean value There are only 2 possible values for Boolean expressions: true and false Simple Boolean expressions from the relational operations are o < less than (5<6) o > greater than (m>n) o <= less than or equal (5<=(a+1)) o >= greater than or equal (a >= 7) o == equals (a+1) == (b+1) o != not equals (5 != 6) Operator precedence Precedence (priority) determines the order in which operations are evaluated For example, 2+3*4 o You evaluate 3*4 first then add 2 You do this because * has a higher precedence than + www.notesolution.com
More Less

Related notes for ITM 200

OR

Don't have an account?

Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Join to view

OR

By registering, I agree to the Terms and Privacy Policies
Just a few more details

So we can recommend you notes for your school.