CPE 101 Lecture Notes - Lecture 1: Bbedit, Pycharm, Interpreted Language

72 views2 pages

Document Summary

Created by guido von rossum in 1991. Designed to write readable code: an interpreted language, 2 main versions in use. Problem 1: calculate man value of 3. 2 and 6. 4 and show result. Steps: create a script - a le that contains python statement, open an editor, create a le with extension . py, write python statement, save the le, start python interpreter - reads and executes script line by line. Rst. py: x=3. 2, y=6. 4, z=(x+y)/2, either: print (z) or print ( my result: , z) (lines1&2): expression, creates a variable and assigns a value. (line 3): an expression, = assignment of operator (not = in math), read from right to left: takes the current values of the variable, calculates the sum and divides by 2 and assigns the value to z. (line 4): print is a so-called function (built-in), prints value or string to the screen. ***textbook: think python - how to think like a computer scientist by downey.

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 textbook solutions

Related Documents