473,378 Members | 1,507 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

beginners help

Hello

I totally new to python and i'm doing a python course now. Maybe someone
could help me a little bit here:

I need to create this script.

If i enter a center digit like 5 for example i need to create two
vertical and horzitonal rows that looks like this. If i enter 6 it shows
6 six starts. How can i do this, because i don't have any clue.

*****
* *
* *
* *
*****

Kind Regards,

--
Guido van Brakel
--
Feb 7 '08 #1
4 1039
2008/2/7, Guido van Brakel <gu******@invalid.xs4all.nl>:
Hello

I totally new to python and i'm doing a python course now. Maybe someone
could help me a little bit here:

I need to create this script.

If i enter a center digit like 5 for example i need to create two
vertical and horzitonal rows that looks like this. If i enter 6 it shows
6 six starts. How can i do this, because i don't have any clue.

*****
* *
* *
* *
*****
This would totally ruin the purpose of your course. Did you try
anything at all ?
Kind Regards,

--
Guido van Brakel
--

--
http://mail.python.org/mailman/listinfo/python-list

--
-- Guilherme H. Polo Goncalves
Feb 7 '08 #2
Guido van Brakel wrote:
Hello

I totally new to python and i'm doing a python course now. Maybe someone
could help me a little bit here:

I need to create this script.

If i enter a center digit like 5 for example i need to create two
vertical and horzitonal rows that looks like this. If i enter 6 it shows
6 six starts. How can i do this, because i don't have any clue.

*****
* *
* *
* *
*****
This list is not there to provide you with solutions to your homework. If
you try and show us your efforts, or have otherwise concrete questions you
certainly will get the help you want.

Diez
Feb 7 '08 #3
On Feb 7, 7:53 am, Guido van Brakel <guidovb1@invalidwrote:
Hello

I totally new to python and i'm doing a python course now. Maybe someone
could help me a little bit here:

I need to create this script.

If i enter a center digit like 5 for example i need to create two
vertical and horzitonal rows that looks like this. If i enter 6 it shows
6 six starts. How can i do this, because i don't have any clue.

*****
* *
* *
* *
*****

Kind Regards,

--
Guido van Brakel
--
If you turn this in you will be rewarded for your effort :)
Expand|Select|Wrap|Line Numbers
  1. side = input("How many stars on a side?:")
  2. if side == 5:
  3. print "*****"
  4. print "*   *"
  5. print "*   *"
  6. print "*   *"
  7. print "*****"
  8. elif side == 6:
  9. print "******"
  10. print "*    *"
  11. print "*    *"
  12. print "*    *"
  13. print "*    *"
  14. print "******"
  15.  
Feb 7 '08 #4
On Thu, 07 Feb 2008 13:53:48 +0100, Guido van Brakel wrote:
Hello

I totally new to python and i'm doing a python course now. Maybe someone
could help me a little bit here:

I need to create this script.

If i enter a center digit like 5 for example i need to create two
vertical and horzitonal rows that looks like this. If i enter 6 it shows
6 six starts. How can i do this, because i don't have any clue.

*****
* *
* *
* *
*****

Start by writing some Python code that draws a horizontal line of stars.
(Hint: "print '*' draws one star.)

Now write some code that draws a column of stars.

Now combine them to draw a square.

Come back when you have some more specific questions.
Regards,

--
Steven
Feb 7 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: P.Hill | last post by:
I was just trying to install Apache and php on an XP box for test of a PHP website I built last year. It was my first and only, so I am now rusty about the little I did learn last year. I get...
7
by: Will | last post by:
Pardon two post in a row to the newsgroup but I want to try and expedite this, if you guys don't mind helping out... I running Windows XP Pro and wanted to download Python and any additional...
7
by: tada991 | last post by:
Hello Everyone, I just purchased Visual Studio .Net Architect 2003 and want to know what's a good book for begginers to start with. I know nothing about programming whatsoever, but I do have a...
6
by: Tony Williams | last post by:
Can someone recommend a good easy to read beginners guide to VB for Access 2000? I did get a list from someone but lost it in a disc crash Thanks Tony Williams
55
by: Cindy | last post by:
Hello!! I'm new at access and there's is an article by Arvin Meyer for beginners that is references in Google Groups but I can't seem to find the original post with the article's URL. Does anyone...
4
by: Eggnog | last post by:
Hi, Is there a newsgroups for beginners questions? Cheers, Nawg
2
by: =?Utf-8?B?UmFrZXNo?= | last post by:
Hi, I have worked in Windows development for some time and want to learn ASP.Net - Web Application. Can some one redirect me to some site where I can find some good start up for beginners course...
4
by: aman firoz | last post by:
do you people got anything for c beginners..... help me out guys
0
by: Dual_b00t | last post by:
hi i created a site called PHP Together its for beginners also for gurus to help out the beginners if you are learning PHP and feel alone then drop by . ciao Mark
19
by: yltkhuu | last post by:
1. How does having a widely adopted C++ standard help game programmers? 2. What are the advantages ans disadvantages of employing the "using" directive? 3. Why might you define a new name for an...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.