Search Header Logo
Programming Constructs & Techniques Part 2

Programming Constructs & Techniques Part 2

Assessment

Presentation

Computers

10th - 12th Grade

Hard

Created by

Jane Sampson

Used 5+ times

FREE Resource

7 Slides • 5 Questions

1

Programming Constructs & Techniques

Part 2

Slide image

2

Logical operators

  • Special symbols used to perform special tasks

3

Basic Logic Operators

  • +

  • -

  • *

  • /

4



The ones we will look at are used to join conditions in IF statements and loops


Here's a simple IF statement:

If password == "secret":

print "Correct"



5

Questions coming up on this code:

  • Be ready

Slide image

6

Multiple Choice

password is an example of a ...

1

variable

2

logical operator

3

command word

4

string

7

Multiple Choice

== is an example of a ...

1

string

2

command word

3

logical operator

4

variable

8

Multiple Choice

Question image

"Correct" is an example of a ...

1

variable

2

command word

3

string

4

variable

9

Multiple Choice

Question image

print is an example of a ...

1

string

2

variable

3

command word

4

logical operator

10

Logical operations

  • These join more than one condition together

  • if len(password) >=8 and <=15;

  • print ("Password changed successfully!)

11

Multiple Choice

Increment means to subtract one from

1

True

2

False

12

Task 4.20 Logical operators

  • Compare and contrast logical operators in different programming languages

Programming Constructs & Techniques

Part 2

Slide image

Show answer

Auto Play

Slide 1 / 12

SLIDE