CP104- Final Exam Guide - Comprehensive Notes for the exam ( 82 pages long!)

289 views82 pages
29 Mar 2018
School
Course
hayjayshay and 38575 others unlocked
CP104 Full Course Notes
2
CP104 Full Course Notes
Verified Note
2 documents

Document Summary

Comments: comments: notes of explanation within a program, ignored by python interpreter, intended for a person reading the program"s code, begin with a # character, end-line comment: appears at the end of a line of code, typically explains the purpose of that line. Different type: a variable in python can refer to items of any type. Constants: you should use named constants instead of magic numbers, a named constant is a name that represents a value that does not change during the program"s execution, example: Interest_rate = 0. 069: this creates a named constant named interest_rate, assigned the value 0. 069. It can be used instead of the magic number: amount = balance * Turtle: use the turtle. hideturtle() command to hide the turtle, this command does not change the way graphics are drawn, it simply hides the turtle icon, use the turtle. showturtle() command to display the turtle.

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

Related Documents