1- CIND830, Module 4 - Introduction

.pdf

School

Toronto Metropolitan University *

*We aren’t endorsed by this school

Course

830

Subject

Computer Science

Date

Jan 9, 2024

Type

pdf

Pages

4

Uploaded by SargentHyena3676

1/30/22, 5:43 PM CIND830, Module 4 - Introduction https://de.ryerson.ca/de_courses/templates/m/?c=70162FE655EC381AC6312EBF026AAC54&m=4&p=200700 1/4 Introduction In this module, we will cover selection statements, or those statements in Python which help make choices during the program run-time and select a set of actions based on a specific criterion or based on the flow of data. We have two topics to cover in this module: the first is comparison expressions , also known as relational and logical expressions , statements in Python that compare two operands or variables, and result in either a Boolean or NoneType object. Then we will move to the second topic in which we will learn the different types of selection statements . For each type, the syntax and structure will be covered, and an illustrative example will be provided to help in exploring them in practice. Topics and Learning Objectives Topics Comparison expressions Types of selection statements Learning Objectives By the end of the module, you will be able to: Relate the third-valued logic to the output of the conditional statements. Construct a conditional statement to make decisions at run-time. Differentiate between one-way, two-way, and multi-way statements. Readings Required Readings Lambert, K. A. (2019). Fundamentals of Python: First programs (2 ed.). Boston, MA: Cengage Learning. Loops and Selection Statements, pages 77–85 Comparison Expressions Please watch and study this video presentation as it demonstrates the implementation of the relational and logical operators in Python. It also explains the critical differences between the relational and logical expressions in terms of designated operators and the data type of their respective operands. The standard Boolean logic used in Python, which includes the True and False objects, has been extended to include a third logical object: None , which represents the absence of data and interprets the output of the logical expressions. nd
1/30/22, 5:43 PM CIND830, Module 4 - Introduction https://de.ryerson.ca/de_courses/templates/m/?c=70162FE655EC381AC6312EBF026AAC54&m=4&p=200700 2/4 Download Download the PDF file for CIND830 - Module 4: Selection Statements . Please note this PDF file will be used in the two videos of this module. In the PDF, you can use the top navigation bar to navigate between the topics covered in each video. Download the CIND830 - Module 4: Comparison Expressions transcript . Types of Selection Statements Please watch and study this video presentation. It explains how the Python interpreter selects specific statements or actions, and makes choices during run-time, or as data flow in the program. Three types of selection statements will be explored: one-way , two-way , and multi-way selection statements. For each type, an illustrative example is provided to show the selection statement's syntactic structure and describe the boundaries of the statement at run-time. Download Download the PDF file for CIND830 - Module 4: Selection Statements and click on the topic Types of Selection Statements ” in the top navigation bar to take you to the beginning of this topic. Download the CIND830 - Module 4: Types of Selection Statements transcript . Self-Assessment Quiz Please complete the following review activity. The activity is not graded. Test Yourself Summary In this module, we covered the comparison expressions that include relational and logical expressions. We highlighted the key differences between them and introduced the three-valued logic that Python Ryecast Video: CIND830 - Module 4: Comparison Expressions Ryecast Video: CIND830 - Module 4: Types of Selection Statements
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help