Re: Python Basics

2014-10-09 Thread Chris Angelico
On Fri, Oct 10, 2014 at 5:26 AM, Tobiah wrote: >> So don't do people's homework for them. PLEASE!! > > > Wow. How do you react when someone does something that's > actually harmful? I don't think you'd have the words! :) You just saw it. Doing someone's homework *is* harmful. Harms the student,

Re: Python Basics

2014-10-09 Thread Tobiah
for i in range(1,10): print (str(i)*i) Seymour, please don't do this. When you "help" someone by just giving him the answer to a homework problem, you get him past his immediate issue of "I need to submit my homework for this problem". That lets him get through his course without understand

Re: Python Basics

2014-10-04 Thread Peter Pearson
On Sat, 04 Oct 2014 11:09:58 +1000, Steven D'Aprano wrote: > Chris Angelico wrote: > >> On Sat, Oct 4, 2014 at 8:54 AM, Seymore4Head >> wrote: > >>> for i in range(1,10): >>> print (str(i)*i) >> >> Seymour, please don't do this. When you "help" someone by just giving >> him the answer to a ho

Re: Python Basics

2014-10-04 Thread alister
On Sat, 04 Oct 2014 11:09:58 +1000, Steven D'Aprano wrote: > Chris Angelico wrote: > >> On Sat, Oct 4, 2014 at 8:54 AM, Seymore4Head >> wrote: > >>> for i in range(1,10): >>> print (str(i)*i) >> >> Seymour, please don't do this. When you "help" someone by just giving >> him the answer to a

Re: Python Basics

2014-10-03 Thread Chris Angelico
On Sat, Oct 4, 2014 at 11:09 AM, Steven D'Aprano wrote: > In fairness to Seymour, at this extremely basic level, it's really hard to > explain to somebody how to solve a problem without giving them the answer. > > While I don't condone mindless parroting of work that others have done, > remember t

Re: Python Basics

2014-10-03 Thread Steven D'Aprano
Chris Angelico wrote: > On Sat, Oct 4, 2014 at 8:54 AM, Seymore4Head > wrote: >> for i in range(1,10): >> print (str(i)*i) > > Seymour, please don't do this. When you "help" someone by just giving > him the answer to a homework problem, you get him past his immediate > issue of "I need to s

Re: Python Basics

2014-10-03 Thread Chris Angelico
On Sat, Oct 4, 2014 at 8:54 AM, Seymore4Head wrote: >>Q2. Implement a function called printNumTriangle. The function should ask the >>user to enter a single integer. It should then print a triangle of that size >>specified by the integer so that each row in the triangle is made up of the >>inte

Re: Python Basics

2014-10-03 Thread Seymore4Head
On Fri, 3 Oct 2014 10:35:38 -0700 (PDT), diarmuid.higg...@mycit.ie wrote: >Hi > >I have just started an introductory course on Python. I have never even seen a >programming language before so I am struggling a bit. Our lecturer has given >us a number of excercises to complete and I am stuck on t

Re: Python Basics

2014-10-03 Thread Tobiah
Hi Chris I can't get the code to display the output as it should. I can get it to display like this: 1223335 or I can get it to display like this: 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 but not as has been asked in the question. Cheers Diarmuid Hint: 'a' * 4 '' -- https://mail.python

Re: Python Basics

2014-10-03 Thread Chris Angelico
On Sat, Oct 4, 2014 at 3:54 AM, wrote: > Hi Chris > I can't get the code to display the output as it should. > I can get it to display like this: > 1223335 or I can get it to display like this: > 1 > 2 > 2 > 3 > 3 > 3 > 4 > 4 > 4 > 4 > 5 > 5 > 5 > 5 > 5 > but not as has been asked in the

Re: Python Basics

2014-10-03 Thread diarmuid . higgins
On Friday, October 3, 2014 6:47:54 PM UTC+1, Chris Angelico wrote: > On Sat, Oct 4, 2014 at 3:44 AM, wrote: > > > def printNumTriangle(): > > >num = input("Please enter an integer for triangle size:") > > >for i in range(1,num+1): > > > for j in range (i): > > > print

Re: Python Basics

2014-10-03 Thread Chris Angelico
On Sat, Oct 4, 2014 at 3:44 AM, wrote: > def printNumTriangle(): >num = input("Please enter an integer for triangle size:") >for i in range(1,num+1): > for j in range (i): > print i > > Cheers Okay! You're very close, and I can see what's going on there. But I'd like y

Re: Python Basics

2014-10-03 Thread diarmuid . higgins
def printNumTriangle(): num = input("Please enter an integer for triangle size:") for i in range(1,num+1): for j in range (i): print i Cheers On Friday, October 3, 2014 6:42:46 PM UTC+1, Chris Angelico wrote: > On Sat, Oct 4, 2014 at 3:35 AM, wrote: > > > Our lecturer

Re: Python Basics

2014-10-03 Thread Chris Angelico
On Sat, Oct 4, 2014 at 3:35 AM, wrote: > Our lecturer has given us a number of excercises to complete and I am stuck > on the one I have listed below. Please help Sure! Show us the code you have so far, and explain what it is you're stuck on. Then we can help you. But we're not going to write t