CSC 127A Lecture 16: CSC 127A/110 Week 6 9.26.16

24 views2 pages

Document Summary

Exam will be shifted 10 points from whatever you received in d2l. Boolean: anything that will be true or false. Students new to boolean often test is a result is true, this is bad style. If (isprime(57) == true): # is bad form because it is redundant. If (isprime(57)): # is better because you do not need to set it equal to == If (not isprime(57)): # would be if you need an == false. There is no need to set it equal to true or false, since it will already return one or the other. There is no need to do the following, since we already have a true or false output. Negated expresions always flip an and to an or and vice versa. A and b = not (a or b) A or b = not(a and b)

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

Related Questions