CSCI 1105 Lecture Notes - Lecture 7: Lexicographical Order, Pseudocode, Boolean Data Type

104 views2 pages
Verified Note

Document Summary

Allows a program to carry out different actions depending on the nature of the data which is to be processed. Uses rational operators, such as: < <= > >= == !=, to compare numbers and strings. Multiple if statements can be combined to evaluate complex decisions. You can nest an if inside either branch (if, else) of an if statement. Can be visualised in a flow chart, if you like: which can be helpful if you have a nested if statement, as there can be many outcomes to consider. Usually initialised and declared right at the top of the code. In case we need to change it, it will be easily accessible. Used throughout the code to represent one value. Create a table of key variables you want to be checking. Can work with pseudocode or with code: write it out with a pen or pencil, write it as comments in your code (save a tree!)

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