Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #78670
| From | Seymore4Head <Seymore4Head@Hotmail.invalid> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Python Basics |
| Date | 2014-10-03 18:54 -0400 |
| Message-ID | <78au2a12nlq6nipske1a327p14dvgvakug@4ax.com> (permalink) |
| References | <3c9504c9-6906-4358-b14c-5764bba70a65@googlegroups.com> |
| Organization | Unlimited download news at news.astraweb.com |
On Fri, 3 Oct 2014 10:35:38 -0700 (PDT), diarmuid.higgins@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 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:
>1
>22
>333
>4444
>55555
for i in range(1,10):
print (str(i)*i)
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Python Basics diarmuid.higgins@mycit.ie - 2014-10-03 10:35 -0700
Re: Python Basics Chris Angelico <rosuav@gmail.com> - 2014-10-04 03:42 +1000
Re: Python Basics diarmuid.higgins@mycit.ie - 2014-10-03 10:44 -0700
Re: Python Basics Chris Angelico <rosuav@gmail.com> - 2014-10-04 03:47 +1000
Re: Python Basics diarmuid.higgins@mycit.ie - 2014-10-03 10:54 -0700
Re: Python Basics Chris Angelico <rosuav@gmail.com> - 2014-10-04 04:04 +1000
Re: Python Basics Tobiah <toby@tobiah.org> - 2014-10-03 11:34 -0700
Re: Python Basics Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-10-03 18:54 -0400
Re: Python Basics Chris Angelico <rosuav@gmail.com> - 2014-10-04 09:05 +1000
Re: Python Basics Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-10-04 11:09 +1000
Re: Python Basics Chris Angelico <rosuav@gmail.com> - 2014-10-04 12:24 +1000
Re: Python Basics alister <alister.nospam.ware@ntlworld.com> - 2014-10-04 09:10 +0000
Re: Python Basics Peter Pearson <pkpearson@nowhere.invalid> - 2014-10-04 17:42 +0000
Re: Python Basics Tobiah <toby@tobiah.org> - 2014-10-09 11:26 -0700
Re: Python Basics Chris Angelico <rosuav@gmail.com> - 2014-10-10 08:38 +1100
Re:Python Basics Dave Angel <davea@davea.name> - 2014-10-03 19:13 -0400
csiph-web