COMPSCI 1MD3 Lecture 5: Branching Iterations - Conditionals and Loops
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.