CS101.Lect19.Python.InputOutput.DefiniteLoop.ppt

CS101.Lect19.Python.InputOutput.DefiniteLoop.ppt - CS101...

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

View Full Document Right Arrow Icon
Computer Science CS101 Lecture 19: Python: The Definite Loop Input, Output, Variables, Arithmetic ASCII Encoding and Decoding The Definite Loop Aaron Stevens (azs@bu.edu) 27 October 2011 Computer Science What You’ll Learn Today Review: variables and arithmetic operations Input and output to a Python program ASCII encoding and decoding The definite loop
Background image of page 1

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

View Full DocumentRight Arrow Icon
Computer Science Variables A variable is a spot in memory which can hold a value. The value is stored using a name we chose. We can recall it when needed to use the value, or change it to hold something else. x = 42 Computer Science Numeric Input and Output requestNumber(message) -- show a input-box with the message, and returns a numeric variable requestInteger(message) -- show a input-box with the message, and returns an integer variable print <expression> -- print out one or more expressions
Background image of page 2
Computer Science Arithmetic Operators Python built-in numeric operators: + addition - subtraction * multiplication / division
Background image of page 3

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

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 7

CS101.Lect19.Python.InputOutput.DefiniteLoop.ppt - CS101...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online