Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Exercise 4: Variables And Names

Name: Zed A. Shaw 2012-01-11 16:55

If you get stuck with this exercise, remember the tricks you have been taught so far of finding differences and focusing on details:

1. Write a comment above each line explaining to yourself what it does in English.
2. Read your .py file backwards.
3. Read your .py file out loud saying even the characters.

Note: The _ is called an underscore character. Find out how to type it if you do not already know.

Extra Credit
 - Explain why the 4.0 is used instead of just 4.
 - Remember that 4.0 is a "floating point" number. Find out what that means.
 - Write comments above each of the variable assignments.
 - Make sure you know what = is called (equals) and that it's making names for things.
 - Remember _ is an underscore character.
 - Try running python as a calculator like you did before and use variable names to do your calculations. Popular variable names are also i, x, and j.

Name: Anonymous 2012-01-11 17:07

2. Read your .py file backwards.

OH MY GOD IT'S A SATANIC MESSAGE

Name: Anonymous 2012-01-11 17:13

>>2
lol'd

Name: Anonymous 2012-01-11 17:33

>>1
- Make sure you know what = is called (equals) and that it's making names for things.

I think you might want to google "python assignment vs equals"

Don't change these.
Name: Email:
Entire Thread Thread List