{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

ecs10-04-07

# ecs10-04-07 - ECS 10 Basic Concepts of Computing Prof...

This preview shows pages 1–3. Sign up to view the full content.

1 1 ECS 10: Basic Concepts of Computing Prof. Michael Gertz [email protected] April 7, 2008 2 Announcements Assignment 1 has been posted; due Friday April 11 at 10pm electronically through MyUCDavis An example program has been posted as template on the “Assignments” class Web page Take advantage of discussion sections (where more examples are presented) and lab hours (to get help with Python installation or your homework). Note again that lecture handouts are posted to class Web site and Google discussion group the day before lecture! It is your responsibility to frequently check the Google discussion Group and front page of class Web site for news and updates!

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2 3 In the previous lecture... print output statement followed by a comma-separated list of expressions e.g., print “12 times 12 is”, 12*12 Expressions in Python: Like arithmetic expressions, based on numbers, strings, variables and other expressions –42 (3/4)*12 4.8+3/x “Hello” “Hi”+name Variable assignments: <variable> = <expression> pi = 3.14159 x = (3/4)* 12 x = x+100 y = y + x**2 – (20/a) + 1042 4 Variables In IDLE shell window: >>> x = 20 >>> x = x + 2.0 >>> print x 22.0 Assignment statement puts a data value into variable named x, which itself is not a data value or an expression IDLE doesn’t type the value back after an assignment statement
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 9

ecs10-04-07 - ECS 10 Basic Concepts of Computing Prof...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online