t_03(1)[1] - Engineering Computation: Tutorial 03 Problem...

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

View Full Document Right Arrow Icon
Engineering Computation: Tutorial 03 Problem Solving with Computing, using the Python Language October 5, 2010
Background image of page 1

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

View Full DocumentRight Arrow Icon
Questions from Week 02? Programming Exercises from Zelle textbook 1 Pg. 72-74 # 1, 5, 8, 12, 13. 2
Background image of page 2
What’s in your toolbox? 1 Print statement, string literals 2 Basic calculator, integer division 3 Variables 4 Built-in functions 5 Math library functions 6 Straight-line (non-branching) programs 7 Branching programs 8 Python lists 9 For loops 10 Nested for loops 11 Strings 3
Background image of page 3

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

View Full DocumentRight Arrow Icon
Today’s Topics: 1 More built-in functions: bin() hex() oct() 2 Python as Graphing Calculator (matplotlib) 4
Background image of page 4
video Converting decimal to binary video Converting decimal to hexadecimal 5
Background image of page 5

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

View Full DocumentRight Arrow Icon
Converting between number systems using Python Let’s take the decimal number 17: 6
Background image of page 6
Converting between number systems using Python Let’s take the decimal number 17: decimal to binary 6
Background image of page 7

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

View Full DocumentRight Arrow Icon
Converting between number systems using Python Let’s take the decimal number 17: decimal to binary >>> bin (17) ’0b10001 ’ 6
Background image of page 8
Converting between number systems using Python Let’s take the decimal number 17: decimal to binary >>> bin (17) ’0b10001 ’ decimal to hexadecimal 6
Background image of page 9

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

View Full DocumentRight Arrow Icon
Converting between number systems using Python Let’s take the decimal number 17: decimal to binary >>> bin (17) ’0b10001 ’ decimal to hexadecimal >>> hex (17) ’0x11 ’ decimal to octal >>> oct (17) ’ 021 ’ 6
Background image of page 10
video Converting binary to decimal video Converting hexadecimal to decimal 7
Background image of page 11

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

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

This note was uploaded on 12/14/2010 for the course ENGINEERIN 1d04 taught by Professor Smith during the Spring '10 term at McMaster University.

Page1 / 35

t_03(1)[1] - Engineering Computation: Tutorial 03 Problem...

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

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