Scuppery 29 Newbie Poster

You know thats not just on the uk here on the states its sort of similar. I bought an iphone with 2G and I am very dissapointed. First, if you drop it just once the screen cracks and it cost me alot to fix it. Second, It does not have anything that a blackberry curve does not have. Thus, I kept my blackbery and sold the iphone to my friend and bought a new laptop with the cash. In my opinion people should not waste their money in any iphone at all but thats just me so people dont hate me. =)

Scuppery 29 Newbie Poster

Very true that’s the recommended style for coding in python. However, as you start to learn a programming language you will see that many things can change and one of those is the style in which you code the programs. Thus, once you have learn the language you can give it your own little spice even thought that’s not what it is recommended. The point is that it doesn’t really matter where you do your imports as long as they work.

Scuppery 29 Newbie Poster

Good question and I am glad you asked. Ok before I go on to explaining why I used there you must know that import math * could have been used anywhere in the code before the three functions(AnB, CnA, CnB). Now the reason why I used there, ok if you look at the code you will notice that everything before import math * statement is the menu of the program and like every program it needs to have commands to do things so I decided to put the import math * statement next to the three functions so the code is a bit neater. Most people use it on the beginning but it can also be used in other places and it become handy if you are writing a program out of the blue and don’t want to go all the way to the beginning to just type in three words. Hopefully that answer your question.

Scuppery 29 Newbie Poster

If you are on school and you are taking algebra like me or just want to find the missing length of one side of the triangle than this program should help you out. Pythagorean Theorem Calculator is great and extremely essay to use thanks to this little program I pass my final exam.

Scuppery 29 Newbie Poster

Hi everyone I am having a little problem with a program that I wrote

def P():
        a = "a"
        aa = "aa"
        b = "b"
        bb = "bb"
        text = raw_input("Enter Text: ")
	SpacedText = ' '.join(list(text))
	OutputText = SpacedText
	if a in OutputText:
		print aa
	if b in OutputText:
		print bb

Now this program works fine but for two things.

1. When I run the program and I am asked to "Enter Text" and I type in "a" the output text is “aa” (same for when I type b). However, when I type in both letter together like this (ba) the output is (aa bb) but what I am looking for is that the output would be in the order I type the letters when I am asked to “Enter Text”.

2. The second problem is that the output is printed diagonally instead of horizontally which is what I would like.

I am sure this errors can be fixed and I would appreciated if anyone could help me with it. Thanks in advance.

Scuppery 29 Newbie Poster

Here is a list of rules that me and a couple of friends made a while back. By the way, if anyone has something like Women rules for men please post it here. Also if I left anything out feel free to add to the list.

1. Men are NOT mind readers.

2. Learn to work the toilet seat.
You're a big girl. If it's up, put it down.
We need it up, you need it down.
You don't hear us complaining about you leaving it down.

3. Sunday sports. It's like the full moon or the changing of the tides. Let it be.

4. Shopping is NOT a sport. And no, we are never going to think of it that way.

5. Crying is blackmail.

6. Ask for what you want.
Let us be clear on this one:
Subtle hints do not work!
Strong hints do not work!
Obvious hints do not work!
Just say it!

7. Yes and No are perfectly acceptable answers to almost every question.

8. Come to us with a problem only if you want help solving it. That's what we do. Sympathy is what your girlfriends are for.

9. A headache that lasts for 17 months is a Problem. See a doctor.

10. Anything we said 6 months ago is inadmissible in an argument. In fact, all comments become null and void after 7 Days.

Ancient Dragon commented: You did no such thing. You stole it off the net -7
Ezzaral commented: Pretty lame to claim you and friends wrote these. -2
Scuppery 29 Newbie Poster

Ever wonder what doctors are thinking when they say one of their occasional phrases? Well after 15 years of doing crazy stunts and visiting the hospital twice a week I have finally gotten some answers:

"This should be taken care of right away."
I'd planned a trip to Hawaii next month but this is so easy and profitable that I want to fix it before it cures itself.

"Welllllll, what have we here...?"
He has no idea and is hoping you'll give him a clue.

"Let me check your medical history."
I want to see if you've paid your last bill before spending anymore time with you.

"We have some good news and some bad news."
The good news is, I'm going to buy that new BMW. The bad news is, you're going to pay for it.

"Let me schedule you for some tests."
I have a forty percent interest in the lab.

"I'd like to have my associate look at you."
He's going through a messy divorce and owes me a bundle.

"I'd like to prescribe a new drug."
I'm writing a paper and would like to use you for a guinea pig.

"This may smart a little."
Last week two patients bit off their tongues.

"This should fix you up."
The drug company slipped me some big bucks to prescribe this stuff.

"I'd like to run some more tests."

Scuppery 29 Newbie Poster

how does 1=2?

^ that is my question ^

Dude I don’t how 1 can equal to 2 but I know how 1 + 1 wont equal to 2.

Answer: When women are doing math, really its statistically proven.(But it is also true that 70% of statistic are fake.)

My question: If a mime is arrested do the cops tell him that he has the right to remain silent?

Scuppery 29 Newbie Poster

I’m not anti-social; I’m just not user friendly (Geek Quote)

nice one

here is a quote I wrote myself its the only one that makes real sense to me.

"Why is it that no human being knows the true meaning of life? For the reason that those who have found it are too caught up in their rage to understand that it ends."

Scuppery 29 Newbie Poster

Is Mt. Everest getting taller ?

I think it is the other way around, the world is getting smaller.


Do pilots take crash-courses? :-/

Scuppery 29 Newbie Poster

Ok everyone the object of this game is to simply - answer the post above without saying "yes", "no", or "sometimes" or any variation of them.

For example: Do you like rock music?
Wrong Answer: "yes or yep, yeah, etc.
Correct Answer: "I love rock music, i think it is the best"

After you have answered the question above you, post one of your own.

so lets get this going......

"Have you met anyone who says they've been abducted by an alien?"

Scuppery 29 Newbie Poster

Damm you are right...well thanks I will post it there

Scuppery 29 Newbie Poster

Ok everyone the object of this game is to simply - answer the post above without saying "yes", "no", or "sometimes" or any variation of them.

For example: Do you like rock music?
Wrong Answer: "yes or yep, yeah, etc.
Correct Answer: "I love rock music, i think it is the best"

After you have answered the question above you, post one of your own.

so lets get this going......

"Have you met anyone who says they've been abducted by an alien?"

Scuppery 29 Newbie Poster

If you want to compile a program than you might want to use py2exe. Its a pretty good compiler that you can use so here is the link and give it a try.

http://www.py2exe.org/index.cgi/FrontPage

Keep in mind that there might be better compilers out there so you might want to search google for a python compiler.

Scuppery 29 Newbie Poster

Here are my favorite geek quotes I have a couple of shirts with some of them on.
P.S I don’t suggest wearing a shirt with #15 to school if you are still stuck in those rat holes like me.

1. There is no place like 127.0.0.1

2. There are 10 types of people in the world: Those who understand binary and those who don’t.

3. Girls are like Internet Domain names, the ones I like are already taken

4. You know it’s love when you memorize her IP number to skip DNS overhead

5. I had a dream… and there were 1’s and 0’s everywhere, and I think I saw a 2!

6. Roses are #FF0000,
Violets are #0000FF.
All my base
Are belong to you.

7. If at first you don’t succeed, call it version 1.0

8. I would love to change the world, but they won’t give me the source code

9. Enter any 11-digit prime number to continue…

10. A Life? Cool! Where can I download one of those?

11. The box said ‘Requires Windows 95 or better’. So I installed LINUX.

12. Windows 98 supports real multitasking - it can boot and crash simultaneously

13. Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

Ancient Dragon commented: Very clever :) +34
serkan sendur commented: great man!!!! +4
Scuppery 29 Newbie Poster

If you are using pygame you would want to use either:

pygame.time.wait()

or

pygame.time.delay()

for more information on how to delay an event go to:

http://www.pygame.org/docs/ref/time.html#pygame.time.wait

Scuppery 29 Newbie Poster

when you are writing a program and you get an errer do you have to start all over again or is it ok to go on. i am just writing some of the programs that are on this site in the sticky's i am writing them in the command line but also in IDLE? which one is better to use

Ok here is what you need to know when it comes to writing a program IDLE is 100 times better than the command line. Yet, when it comes to running a program they look better in the command line. There are a couple of ways to run your program again so here are some scenarios using a very simple program that converts Celsius to Fahrenheit.

If you open the python interpreter(IDLE) you can write a simple program and run it. Here is the program that converts Celsius to Fahranheit

def C2F():
	Celsius = input("Enter degrees in Celsius: ");
	Fahrenheit = (9.0 / 5.0) * Celsius + 32
	print Celsius, "Celsius =", Fahrenheit, "Fahrenehit";

This is a very simple program that you can run over and over by just typing C2F() (keep in mind that you must have already written then program to run it. Trust me I've seen some weird cases). So basically all you need to is define a function and write your program so that you can keep running it over and over . Hopefully that helped you and good luck programming.

Scuppery 29 Newbie Poster

What you should do is rewrite your program and put it on a while loop so that when it ends it restarts by itself. Once you got that you should make a quit option and the program should work properly. Thus, your program will restart every time it ends and there will be an option to quit so they can stop the program. Here is an example of one of my programs look at the end of the program that’s where the while loop is located. Hopefully this helped you and good luck.

link:

http://www.daniweb.com/code/snippet887.html

Scuppery 29 Newbie Poster

Here is what you need to do:

1. Open the Python IDLE and type in:

>>> help()

(The following text will come up follow the instruction and you should find all the information you need)

Welcome to Python 2.5! This is the online help utility.

If this is your first time using Python, you should definitely check out
the tutorial on the Internet at http://www.python.org/doc/tut/.

Enter the name of any module, keyword, or topic to get help on writing
Python programs and using Python modules. To quit this help utility and
return to the interpreter, just type "quit".

To get a list of available modules, keywords, or topics, type "modules",
"keywords", or "topics". Each module also comes with a one-line summary
of what it does; to list the modules whose summaries contain a given word
such as "spam", type "modules spam".

2. To be honest I’ve never heard of a module called gasp so I suggest you read the e-book over because you might be missing something. Hope this helped and good luck.

Scuppery 29 Newbie Poster

Dude you need to give more information for anyone to help you and make sure you post your question on the right forum.

Scuppery 29 Newbie Poster

thanks that really helped a lot I can finish my program now. BTW my the scientific notation conversion is right since there are 18 numbers after the decimal.

Scuppery 29 Newbie Poster

Ok here is my problem more detailed. Lets say I am making a simple program in which I ask the person to type in a number and that number is multiplied my some other number of my choice. Now what I want is to put a subscript or superscript to the new number. How do I do that? Here is an example of the code I just describe:

def N():
a = input("Please enter any number: ");
b = a * 0.00544
print b

Now what I want is that when the program prints b to print a subscript or superscript next to it. The reason I am trying to get the sub/superscripts is that whenever python does a mathematical operation such as 5 * 0.00544 it prints this 0.027200000000000002 which can be simplified as 0.0272x10^18. Hopefully this explain better my little dilemma.

Scuppery 29 Newbie Poster

Hey there everyone I need a little help. Right now I am in the process of writing a program that uses subscripts and superscript but I dont have a clue how to get them. I am not even sure if they can be used in python so if any of you could give me a little help I would love it. :)