Python Basics

diarmuid.higgins at diarmuid.higgins at
Fri Oct 3 19:35:38 CEST 2014


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 the one I have listed below. Please help 

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 integer displayed. 

The following is a sample output

Please enter an integer for triangle size:

More information about the Python-list mailing list