CISC 121 Lecture Notes - Lecture 2: Equals Sign, Style Guide

84 views3 pages
Verified Note

Document Summary

Variables in python 3 must be named as follows. Name starts with a letter or underscore. The rest of the name may contain letters, numerals 0 through 9, or underscores, but no spaces. There are also conventions in variable naming, i. e. thisstyleiscalledcamelcase (because of the humps) this_style_is_called_snake_case. The official python 3 style guide gives preference to snake case over camel case for variable naming. When we give a value to a variable in this way, the computer is performing an assignment. In python and c-like languages, the equals sign, =, is used as the assignment operator. This goes between a variable name (a variable identifier), on the left and some value on the right, and means, overwrite the memory location used for the variable on the left with the value on the right. Here are some variables of the types we have looked at being assigned to new values:

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