[Tutor] Exercise to work on
Joseph Lee
joseph.lee22590 at gmail.com
Wed Aug 13 00:39:51 CEST 2014
Hi Keith,
It depends on what you want to do with Python in the end (by the
way, if statement is not a function).
Here are some of my suggestions (based on current topics and
things to come later):
1. Write a loop which prints even numbers from 1 to 100.
2. Write a program which determines if the entered number is an
even or odd number.
3. Given a string, locate the last occurrence of a character.
4. Write a program that says number of characters in a string
and whether it starts with a consonant or a vowel.
I think that's it for now. Again the rest of the exercises that
might show up might depend on your ultimate goal with Python (by
the way, which version are you using?). Other topics to learn
about would be how to write functions, reading from a file, while
and for loops and working with organized data such as lists and
dictionaries.
Cheers,
Joseph
----- Original Message -----
From: keith papa <keithadu at live.com
To: "tutor at python.org" <tutor at python.org
Date sent: Tue, 12 Aug 2014 16:52:44 -0400
Subject: [Tutor] Exercise to work on
Hi, am a newbie to python and I wondering if you guys can give me
some exercise to work on. I have learned: print function , if
function , strings, variables, and raw_input. The more the
better
More information about the Tutor
mailing list