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+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents