Docsity

Assignment for Basic Concepts of Computing - Fall 2009 | ECS 010, Assignments of Computer Science

Toggle sidebar
bg1
ECS 10, Basic Concepts of Computing Spring Quarter 2009
Version of April 8, 2009 at 12:29 AM Page 1 of 1
Outline for April 13, 2009
Reading: text, §3.5–3.7
1. Biggest and smallest integer
a. More about bits
b. Show 32 bit maximum, minimum signed integer
c. Show largest floating point number that, when added to 1, is ignored (see eps.py)
2. Type conversion review
a. Assignment
b. Use of float(), int()
c. In arithmetic
3. Built-in function
a. type()
b. round()
c. range()
4. Math library
a. Making library available to program: “import math”
b. With above form of inclusion, must prefix with “math.”
c. With “from math import *”, don’t need “math.”
d. Constants: pi, e
e. Functions: log(), log10(), exp(), pow()
f. Functions: sin(), cos(), tan(), asin(), acos(), atan(); arg in radians
5. Program to compute sin2(x) + cos2(x) (see trig.py)

Partial preview of the text

Download Assignment for Basic Concepts of Computing - Fall 2009 | ECS 010 and more Assignments Computer Science in PDF only on Docsity!

ECS 10, Basic Concepts of Computing Spring Quarter 2009 Version of April 8, 2009 at 12 : 29 AM Page 1 of 1

Outline for April 13, 2009

Reading : text, §3.5–3.

  1. Biggest and smallest integer a. More about bits b. Show 32 bit maximum, minimum signed integer c. Show largest floating point number that, when added to 1, is ignored (see eps.py)
  2. Type conversion review a. Assignment b. Use of float(), int() c. In arithmetic
  3. Built-in function a. type() b. round() c. range()
  4. Math library a. Making library available to program: “import math” b. With above form of inclusion, must prefix with “math.” c. With “from math import *”, don’t need “math.” d. Constants: pi, e e. Functions: log(), log10(), exp(), pow() f. Functions: sin(), cos(), tan(), asin(), acos(), atan(); arg in radians
  5. Program to compute sin^2 (x) + cos^2 (x) (see trig.py)