COMPSCI 1MD3 Lecture 5: Branching Iterations - Conditionals and Loops

40 views3 pages

Document Summary

I== j equality test, true if iis the same as j. I!= j inequality test, true if inot the same as j. A, b are variable names (with boolean values) Not a returns true if a is false returns false if a is true. A and b returns true if both are true. A or b returns true if either or both are true. While loop example #1 x = input("do you want to continue: yes or no? ") while(x=="yes): x = input("do you want to continue: yes or no? ") While loop example #2 def search(s, target): i= 0 while(i takes a value.

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