[Tutor] Programs for Newbies?

Steven D'Aprano steve at pearwood.info
Sat Nov 6 06:55:35 CET 2010


Danyelle Davis wrote:
> Hi all,
> 
> Any suggestions for a newbie to program while learning python?  I am new to
> programming and python.


Here's a few suggestions:


Write a program that asks the user to enter a word, then counts how many 
vowels and consonants are in the word.

Write a program that asks the user for a list of numbers, separated by 
spaces or commas, and then calculated the average.

A program that prints the time.

A program that prints how many days to go until their next birthday.

A program that counts how many palindrome numbers there are between two 
other numbers. (A palindrome number is one like 12321, or 473374.)

A program that sings (well, prints) the "There were ten in the bed" 
song. If you don't know it, it is a children's song. You start off by 
holding up ten fingers, or you can use actual children. You don't have 
to start with ten. Then you sing:

There were ten in the bed, and the little one said,
Roll over! Roll over!
And they all rolled over and ONE FELL OUT!
There were nine in the bed, and the little one said,
Roll over! Roll over!
And they all rolled over and ONE FELL OUT!
There were eight in the bed, and the little one said,
...

Well you get the idea. Eventually you've left with only the little one 
left, and the song ends:

There was one in a bed, and the little one said
Good night!




-- 
Steven



More information about the Tutor mailing list