{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

01_slide_presentation[1]

# 01_slide_presentation[1] - Engineering Computation Tutorial...

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

Engineering Computation: Tutorial 01 Problem Solving with Computing, using the Python Language

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

View Full Document
Questions from Week 00? Programming Exercises from Zelle textbook 1 pg. 22 # 1 2 pg. 23 # 2- 5 (you will need to have read Chapter 1 to attempt these). 2
Friendly note: practice, practice, practice ... You learn to drive by driving. 3

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

View Full Document
Friendly note: practice, practice, practice ... You learn to drive by driving. You learn to play the guitar by playing the guitar. 3
Friendly note: practice, practice, practice ... You learn to drive by driving. You learn to play the guitar by playing the guitar. You learn to play hockey by playing hockey. 3

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

View Full Document
Friendly note: practice, practice, practice ... You learn to drive by driving. You learn to play the guitar by playing the guitar. You learn to play hockey by playing hockey. You learn to program by programming. So try not to spend all your time driving, playing guitar and playing hockey. Make some room for Python :-) 3
During the teaching session, you should start IDLE and try to replicate the code samples. Quick Review Calculate 14.0 to the 6th power. 4

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

View Full Document
What’s in your toolbox? 1 Python print statement 2 String literals 3 Basic calculator 4 Integer division 5
Today’s Topics: 1 Variables 2 Variable types 3 Assigning values to variables 4 Some built in functions: type() id() str() int() float() abs() round() range() 5 Some math library functions 6 Straight-line (non-branching) programs. 7 Introduction to conditionals (branching programs) 6

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

View Full Document
Variables Introduction to Program Variables: ”jar”model need to calculate values that represent physical entities like: velocity acceleration time other data items manipulate and store data. a variable is bound to a value as if saying ”this is x”. >>> x = 5 >>> 7
How to name Variables Variable naming conventions 1 Variable names cannot start with a number. 8

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

View Full Document
How to name Variables Variable naming conventions 1 Variable names cannot start with a number. 2 Extremely short or very long variable names can be hard to work with in certain contexts. 3 Use names of an appropriate length that are meaningful . For example: 8
How to name Variables Variable naming conventions 1 Variable names cannot start with a number. 2 Extremely short or very long variable names can be hard to work with in certain contexts. 3 Use names of an appropriate length that are meaningful . For example: thisIsMyVeryLongNameForAVariable = "bad" , would be annoying. 8

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

View Full Document
How to name Variables Variable naming conventions 1 Variable names cannot start with a number. 2 Extremely short or very long variable names can be hard to work with in certain contexts. 3 Use names of an appropriate length that are meaningful . For example: thisIsMyVeryLongNameForAVariable = "bad" , would be annoying. a=5 is not very meaningful. What is "a" ? 8
How to name Variables Variable naming conventions 1 Variable names cannot start with a number.

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 130

01_slide_presentation[1] - Engineering Computation Tutorial...

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

View Full Document
Ask a homework question - tutors are online