[Tutor] newbie problem

josip josipl2000 at yahoo.com
Tue Feb 7 18:03:50 CET 2006


Hi, I am learning Python trought one course.
 I can't solve this, someone please help.
     Write a loop that prints 20 characters on the screen.  Always 20. But it is made up of stars (*), which are printed first, and exclamation marks (!) that complete the line.  Your program will first ask the user to enter a number.  It will represent the number of stars that should be present in the line.  The program will then print exclamation marks until the total number of characters is 20.  
 
 Examples of how your program should work (user input underlined):  
       How many stars? 10
       * * * * * * * * * * ! ! ! ! ! ! ! ! ! ! 

       How many stars? 20
       * * * * * * * * * * * * * * * * * * * *

       How many stars? 1
       * ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
       
 Thanks!
			
---------------------------------
 Yahoo! Mail - Helps protect you from nasty viruses.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20060207/1532319f/attachment-0001.htm 


More information about the Tutor mailing list