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

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

Engineering Computation: Tutorial 03 Problem Solving with Computing, using the Python Language October 5, 2010

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

View Full Document
Questions from Week 02? Programming Exercises from Zelle textbook 1 Pg. 72-74 # 1, 5, 8, 12, 13. 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

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

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

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

View Full Document
Converting between number systems using Python Let’s take the decimal number 17: 6
Converting between number systems using Python Let’s take the decimal number 17: decimal to binary 6

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

View Full Document
Converting between number systems using Python Let’s take the decimal number 17: decimal to binary >>> bin (17) ’ 0b10001 ’ 6
Converting between number systems using Python Let’s take the decimal number 17: decimal to binary >>> bin (17) ’ 0b10001 ’ decimal to hexadecimal 6

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

View Full Document
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
video Converting binary to decimal video Converting hexadecimal to decimal 7

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 ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern