Re: [Tutor] Fwd: Puzzle - Next Step to our interviewing process - Pramati Technologies!

2014-04-23 Thread brian arb
My Bad On Wed, Apr 23, 2014 at 1:53 PM, Danny Yoo wrote: > Hi Brian, > > I would suggest not providing homework solutions. > > Look at the beginning of this thread to see why just giving homework > solutions is not helpful for the questioner. > ___ Tu

Re: [Tutor] Fwd: Puzzle - Next Step to our interviewing process - Pramati Technologies!

2014-04-23 Thread brian arb
>>> nums1 = [3, 1, 4] >>> nums2 = [2, 7, 1] >>> [ sum(i) for i in zip(nums1, nums2)] [5, 8, 5] On Wed, Apr 23, 2014 at 1:12 PM, Danny Yoo wrote: > Hi Sunil, > > > Try a simpler but related problem first. > > Say that you have two lists of numbers, like: > > ## > nums1 = [3, 1, 4] > nums2

[Tutor] Why should modules or packages should define their own domain-specific base exception class?

2014-04-14 Thread brian arb
I don't quite understand why the google python style guide recommends that packages and modules we write should avoid using the catch-all except. Instead the guide encourages you to write domain specific exception classes. class Error(Exception): """...""" class ThisSpecificError(Error): """.

Re: [Tutor] Fwd: we need assistance in my school

2013-10-14 Thread brian arb
This looks like a very fun way to teach programming at an early age http://scratch.mit.edu/ On Mon, Oct 14, 2013 at 6:54 AM, Okechukwu Nkaronye wrote: > -- Forwarded message -- > From: Okechukwu Nkaronye > Date: Fri, 11 Oct 2013 13:04:10 + > Subject: we need assistance in my

Re: [Tutor] HELP Please!!!....How Do I Make a Graph Chart Generate in Python Based on my Code

2013-09-24 Thread brian arb
http://mcsp.wartburg.edu/zelle/python/ppics1/code/chapter05/futval_graph2.py On Tue, Sep 24, 2013 at 4:36 PM, School wrote: > What is the error you received? What lines does it say are causing the > error? > > Also, this smells like classwork. > > On Sep 20, 2013, at 21:26, znx...@yahoo.com wro

Re: [Tutor] Continuation of long lines of string characters

2013-04-30 Thread brian arb
I really like breaking my long strings like... Take this... my_very_long_string = "I have been looking through PEP 8--Style Guide for Python Code. It recommends a maximum line length of 79 characters. What is the preferred way to continue on another line or lines really long print functions of str

Re: [Tutor] FYI: An Introduction to Interactive Programming in Python

2013-04-09 Thread brian arb
n code written attempt to solve the puzzle you click on the button "next iteration" until you reach a solution or the code fails to resolve any more of the cells. On Mon, Apr 8, 2013 at 7:58 PM, Steven D'Aprano wrote: > On 09/04/13 06:38, brian arb wrote: > >> An Introdu

[Tutor] FYI: An Introduction to Interactive Programming in Python

2013-04-08 Thread brian arb
An Introduction to Interactive Programming in PythonJoe Warren, Scott Rixner, Stephen Wong and John Greiner This course is designed to be a fun introduction to the basics of programming in Python. Our main focus will be on building simple interactive games such as Pong, Blackjack and Asteroids. h

Re: [Tutor] Python Pipes

2012-10-29 Thread brian arb
Suggestion that you restate your request in the form of a question that is less generic and more specific to what you are looking for. On Mon, Oct 29, 2012 at 6:33 AM, Ganesh Manal wrote: > Please give me sample python program that works with python31 > > > Thanks & Regards, > Ganesh Manal. > >

Re: [Tutor] properties beginner M Dawson book

2012-06-11 Thread brian arb
I'm a bad fan of Nick Parlante teaching style. He has a excellent site that has some exercises to teach Python, and they are backed with unittests. http://codingbat.com/python <http://codingbat.com/python> On Mon, Jun 11, 2012 at 11:05 AM, brian arb wrote: > I would look into

Re: [Tutor] properties beginner M Dawson book

2012-06-11 Thread brian arb
I would look into pylint, Python source code looking for bugs and signs of poor quality. > There are, unfortunately, no answers nor examples of good and bad code. > Honestly I don’t want to “cheat” but I have to teach Python to some young > students in September, using this book, and I want all

Re: [Tutor] Concatenating Strings

2012-05-28 Thread brian arb
Your right that example from the book is a terrible example the point or the reason to concatenating strings. here is a simple usage of where concatenating strings prints out a simple string as a counter in a loop. >>> for i in range(5): ... print(str(i) + ' in for loop') ... 0 in for loop 1

Re: [Tutor] print 'hello world' - invalid syntax

2012-05-20 Thread brian arb
http://docs.python.org/release/3.0.1/whatsnew/3.0.html The print statement has been replaced with a print() function, with keyword arguments to replace most of the special syntax of the oldprint statement (*PEP 3105*

[Tutor] Your thoughts on designing python code for unit testing?

2012-01-04 Thread brian arb
What are some of the strategies for designing code to be unit tested? ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] while loop ends prematurly

2012-01-01 Thread brian arb
Hello, Can some please explain this to me? My while loop should continue while "owed" is greater than or equal to "d" first time the function is called the loop exits as expected False: 0.00 >= 0.01 the next time it does not False: 0.01 >= 0.01 Below is the snippet of code, and th