[Tutor] can any one help

Robert Berman bermanrl at cfl.rr.com
Sun Jan 31 17:15:26 CET 2010


Grigor Kolev <grigor.kolev at gmail.com>

From: tutor-bounces+bermanrl=cfl.rr.com at python.org
[mailto:tutor-bounces+bermanrl=cfl.rr.com at python.org] On Behalf Of
invincible patriot
Sent: Sunday, January 31, 2010 5:03 AM
To: rabidpoobear at gmail.com; grigor.kolev at gmail.com
Cc: tutor at python.org
Subject: Re: [Tutor] can any one help

please check the questions below.

1
 1.1 Write a Python program with a loop that prints out a sequence of
numbers as follows:
15
13
11
...
3
1
-1


1.2 Write a small Python program that generates the list of all pairs of
characters c and
its doubling 2  c, where c moves through all the letters of the string
"foobar" and prints it out.
The result will look like:
[(’f’, ’ff’), (’o’, ’oo’), (’o’, ’oo’), (’b’, ’bb’), (’a’, ’aa’), (’r’,
’rr’)]
Hint: use list comprehensions.........
.................<REALLY BIG SNIP>


What possible reason would you have for expecting anyone n this group to do
your school work for you?

If you really want help, show us the status of your current scripts and
quote us the errors you are receiving.

Good luck,

Robert



More information about the Tutor mailing list