CS 110 Lecture 2: CS 110 Lesson 2 notes

50 views2 pages

Document Summary

9/1/16 import os os. system("clear") to clear the terminal screen on mac and linux os. system("cls") for windows. Variable syntax: myvarisgreat - camel case, used generally for java my_var_is_great - snake case, used for python* *any case can be used for python, as long as it is consistent (don"t switch from camel case to snake case within the same piece of code) Combining two or more values to make a new value: x + y*5. Assigning something to a variable: z = x +y. If the string has anything other than a number, it will produce an error. Algorithms are like a recipe for a computer. A valid outcome comes when all of the steps are implemented properly. Classwork examples (note that this isn"t the complete classwork, because the professor doesn"t put the classwork up: calculate the expressions below: 10//15 : use parentheses to make the expression equal 78.

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