Python Basics

Chris Angelico rosuav at gmail.com
Fri Oct 3 13:47:39 EDT 2014


On Sat, Oct 4, 2014 at 3:44 AM,  <diarmuid.higgins at mycit.ie> 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 you to learn how to ask questions, as well as how to write Python
code, because both skills are important to your future. :) So I'm
going to get you to take another step in asking the question: What is
it that your code isn't doing right?

ChrisA



More information about the Python-list mailing list