ecs10-04-07

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

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

View Full Document Right Arrow Icon
1 1 ECS 10: Basic Concepts of Computing Prof. Michael Gertz gertz@cs.ucdavis.edu 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!
Background image of page 1

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

View Full DocumentRight Arrow Icon
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
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/16/2011 for the course ECS 40175 taught by Professor Amenta during the Spring '09 term at UC Davis.

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 Right Arrow Icon
Ask a homework question - tutors are online