PythonGroup
Welcome, Guest. Please login or register.
September 09, 2010, 12:35:18 AM

Login with username, password and session length
Search:     Advanced search
The Notify button enables registered members to subscribe to email notifications.
66 Posts in 17 Topics by 28 Members
Latest Member: nikhil
* Home Help Login Register
+  PythonGroup
|-+  Core Python Programming
| |-+  Core Python Programming (The Book)
| | |-+  Exercise 2-3 chapter 2
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: Exercise 2-3 chapter 2  (Read 455 times)
bibimidi
Newbie
*
Offline Offline

Posts: 13


View Profile
« on: February 15, 2010, 01:27:04 PM »

Hi gang,

Here's my bit modification of exercise 2-3. I appreciate any comment(s) to my code:

http://paste.debian.net/59956/

I would like to loop this until the user call it quits. Thats a todo no doubt. I have not included any error exception handling. That will be a separate topic i think.

I did not include if __name__ == '__main__" call yet. Should this be practiced early to get used to it? Thanks  Cheesy.
 
Logged
comprookie2000
Administrator
Newbie
*****
Offline Offline

Posts: 48



View Profile WWW
« Reply #1 on: February 15, 2010, 03:30:02 PM »

You can also start adding your answers on the wiki
Here is Chapter 2;
http://asterisklinks.com/wiki/doku.php?id=core:part2
Here is Chapter 3;
http://asterisklinks.com/wiki/doku.php?id=core:part3

And here is the Main Page that they all link to;
http://asterisklinks.com/wiki/doku.php?id=core:start#chapters

I looked at your program and it is great, one of the questions that comes up later in chapter 5 is to create a calculator program. Here is mine 5-6;
http://asterisklinks.com/wiki/doku.php?id=core:part5

The problem with paste bins it that when someone visits that link at a later date it will be gone. That paste expires: 2010-02-18 21:14:57
« Last Edit: February 15, 2010, 03:39:52 PM by comprookie2000 » Logged

bibimidi
Newbie
*
Offline Offline

Posts: 13


View Profile
« Reply #2 on: February 15, 2010, 09:15:07 PM »

Hi David  Smiley

I agree about the limited life of paste bins. As for the wiki will have a look at them. If i have question will post here.

I'm just finding free time to work on the exercises. The day job gets in the way at times. Just have to do my best to multitask  Grin
Logged
comprookie2000
Administrator
Newbie
*****
Offline Offline

Posts: 48



View Profile WWW
« Reply #3 on: February 16, 2010, 02:45:16 AM »

Once you get use to the wiki syntax it is pretty easy to use.
headers go between ===Header===
To add a new page;
[[core:newpage]]
click on the link to the new page and add a header then your code;
<code python>
your code
</code>
Logged

bibimidi
Newbie
*
Offline Offline

Posts: 13


View Profile
« Reply #4 on: February 16, 2010, 11:46:30 AM »

Cant make a new page for my practice codes. I tried posting in the playground and i hope i didnt mess up the wiki. Will try again.
Logged
bibimidi
Newbie
*
Offline Offline

Posts: 13


View Profile
« Reply #5 on: February 16, 2010, 12:30:53 PM »

Update: added my page under 2-3 examples. Thanks  Cheesy

http://asterisklinks.com/wiki/doku.php?id=core:part2
Logged
comprookie2000
Administrator
Newbie
*****
Offline Offline

Posts: 48



View Profile WWW
« Reply #6 on: February 16, 2010, 02:22:29 PM »

Update: added my page under 2-3 examples. Thanks  Cheesy

http://asterisklinks.com/wiki/doku.php?id=core:part2

Very nice bibimidi, good job, it can be a little confusing at first, but you got it now  Grin
Logged

bibimidi
Newbie
*
Offline Offline

Posts: 13


View Profile
« Reply #7 on: February 19, 2010, 10:58:46 AM »

Added my code interpretation:

http://asterisklinks.com/wiki/doku.php?id=wiki:loops_and_operators

Appreciate your feedback, if any  Cheesy
Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.8 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!