Python Basics

diarmuid.higgins at mycit.ie diarmuid.higgins at mycit.ie
Fri Oct 3 19:44:57 CEST 2014


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,  <diarmuid.higgins at mycit.ie> 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 the code
> 
> for you.
> 
> 
> 
> ChrisA



More information about the Python-list mailing list