08-11-2010, 02:07 PM
I'll try that soon, looks good to me anyway thanks
My first program
|
08-11-2010, 02:07 PM
I'll try that soon, looks good to me anyway thanks
08-11-2010, 02:10 PM
No problem. =)
Like I said before, though. there are probably better ways.
08-12-2010, 07:23 AM
a downloadable version would be nice. But just scimming it over, seems like a nice idea for a beginner. Continue to learn and code.
08-12-2010, 01:16 PM
08-13-2010, 10:12 AM
nice, keep trying u'll make it pro.
08-13-2010, 10:50 AM
Hey, I added some thing to your program.
Code: import os First, i moved the import os to the top. you should have all imports at the top of the script. Next, I added a loop, so if somebody does not answer with 'male' or 'female' it askes again. Finally, when asking about the number of pets, you have values for more and less than 5, but you do not have one for equal to 5, so I added one. Nice beginning project
08-13-2010, 07:38 PM
thanks titan
but what does 'break' mean?
08-13-2010, 07:51 PM
(This post was last modified: 08-13-2010, 07:53 PM by Daniel Faraday.)
(08-13-2010, 07:38 PM)ReaLiTy Wrote: thanks titan In my method I just set the variable as true. The way he did it was the same thing except just stopping it from looping again. Also replace the part that asks for input with this. Code: first = raw_input("\nPlease enter your gender: ").lower() You set it where if the user inputs MALE it will say it's not a gender.
08-13-2010, 07:57 PM
Well I have to find out how to install Python now... I deleted windows
08-13-2010, 07:58 PM
(This post was last modified: 08-13-2010, 08:00 PM by Daniel Faraday.)
Are you running Linux?
Most distros come with Python. If you are using Linux and don't have it... sudo apt-get install python Will get you where you need to be if your distro is based on Debian. |
« Next Oldest | Next Newest »
|