bumsfeld 413 Nearly a Posting Virtuoso

The best way to pick random integers between 1 and 15 is this way:

import random

# selects one random integer from 1 to 15
pick = random.randint(1, 15)

Then you set up one 'endless while loop' asking the user to enter the guess. Use series of if/elif statements comparing the guess with the pick. If the guess is higher or lower let the user know and stay in the loop. If the guess is correct break out of the loop and then tell the user that the guess is correct.

bumsfeld 413 Nearly a Posting Virtuoso

"Military action (in Iraq) will not last more than a week."
-- Bill O'Reilly (Fox News), January 23, 2003

bumsfeld 413 Nearly a Posting Virtuoso

A toasted Bagel with cream cheese and a mug of Rio coffee.

Bagel are good things, aren't they? I like mine with Philadelphia cheese or nicely ripened baked Camembert cheese.

bumsfeld 413 Nearly a Posting Virtuoso

good catch. Thought it was an Alize at first, but there were too many things wrong with it.

The plane looks like something out of comic strip. :)

bumsfeld 413 Nearly a Posting Virtuoso

Wow Zoe, very nice write about John McCain.

Watching McCain on TV, is this man lacking from coherence? He seems to mix up his Iraq and Iran items and needs to be corrected by invided people around him.

bumsfeld 413 Nearly a Posting Virtuoso

Only 3 athletes have ever won medals at both the Winter and Summer Olympics:

Eddie Eagan of the USA
Jacob Thams of Norway
Christa Luding-Rothenburger of Germany.

bumsfeld 413 Nearly a Posting Virtuoso

...
Oh? Can you be specific about the lack of innovation? There's a lot of people who give Microsoft a lot of credit for being innovative about how their products work, more than coming up with new off-the-wall technologies...

The investor wants to hear about innovations that make money down the road. Maybe Microsoft does not communicate well with the financial community?

bumsfeld 413 Nearly a Posting Virtuoso

... let's not fool ourselves into thinking that they (MS) sit on their considerably giant ass and steal ideas from the likes of Apple.

My thoughts too!

bumsfeld 413 Nearly a Posting Virtuoso

If you really want to do something, you will find a way. If you don't, you will find an excuse.
-- Tibetan Proverb

bumsfeld 413 Nearly a Posting Virtuoso

Why did Japanese kamikaze pilots wear helmets?

bumsfeld 413 Nearly a Posting Virtuoso
bumsfeld 413 Nearly a Posting Virtuoso

When you were born, you cried and the world rejoiced. Live your life in such a manner that when you die the world cries and you rejoice.
-- an Indian Proverb

bumsfeld 413 Nearly a Posting Virtuoso

In ancient Egypt people used pillows made of stone.

bumsfeld 413 Nearly a Posting Virtuoso

In politics, if you want anything said, ask a man; if you want anything done, ask a woman.
-- the iron Lady Margaret Thatcher

bumsfeld 413 Nearly a Posting Virtuoso

Scrambled eggs with cheese, and café au lait.

bumsfeld 413 Nearly a Posting Virtuoso

Dogs look up to us. Cats look down on us. Pigs treat us as equals.
The Last Lion

bumsfeld 413 Nearly a Posting Virtuoso

I love my Saturn Sky Roadster!
Sunburst Yellow of course!

Yeah, that is one nice looking car. Makes the Ford Mustang look like certified nerdmobile.

bumsfeld 413 Nearly a Posting Virtuoso

Something like that?

def foo():
    return foo.bar

foo.bar = "foobar"

print foo()  # foobar
bumsfeld 413 Nearly a Posting Virtuoso
bumsfeld 413 Nearly a Posting Virtuoso

Looks to me like you have to study the module audio somewhat closer.

bumsfeld 413 Nearly a Posting Virtuoso

... Java can be compiled into bytecode and run onto of a virtual machine, But since python is interprated, it cannot.
...

Utter bull! Python is also compiled to bytecode and then run onto virtual machine. Please educate yourself a little before you say ignorant things.

Have you actually read this post in this thread?
http://www.daniweb.com/forums/post575389-40.html

bumsfeld 413 Nearly a Posting Virtuoso

Let your fingers do the talking!

bumsfeld 413 Nearly a Posting Virtuoso

If you're playing a poker game and you look around the table and can't tell who the sucker is, it's you.
-- Paul Newman

bumsfeld 413 Nearly a Posting Virtuoso

Q: "Where do you get virgin wool from?"
A: "Ugly sheep."

bumsfeld 413 Nearly a Posting Virtuoso

A new British survey has revealed that 9 out of 10 people like Chocolate. The tenth lies.

bumsfeld 413 Nearly a Posting Virtuoso

People shouldn't be treated like objects. They aren't that valuable.

P. J. O'Rourke

bumsfeld 413 Nearly a Posting Virtuoso

Rice, vegetable, some shrimp and one glass of red table wine from friend's vineyard. C'est la vie!

bumsfeld 413 Nearly a Posting Virtuoso

Each of us wages battles each day between the grand dreams we have and what actually happens.

bumsfeld 413 Nearly a Posting Virtuoso

The Dude:
Like him a lot! We match tastes when it comes to web sites, the ones that make me smile.

bumsfeld 413 Nearly a Posting Virtuoso

Arnold Schwarzenegger and Henry Kissinger are fourth cousins once removed.

More info:
Henry Kissinger was born in Bavaria, and Arnold was born just across the border in Austria.

bumsfeld 413 Nearly a Posting Virtuoso

So the US candidate not only has to go to church, but the right church too!

I understand going to church in the US is one good tax deduction possibility.

bumsfeld 413 Nearly a Posting Virtuoso

Lardmeister:
One real rebel, too smart for his age, almost scary. The 'meister' of debating with little tolerance for ignorant folks, will cut the lard out! I really enjoy his wit.

bumsfeld 413 Nearly a Posting Virtuoso

#37, one of my old favorites. Dad worked on those when I was kid, when he was stationed in France.

F-84F Thunderstreak

Wow, that was quick, you are of course correct!

Quickly, let's put in plane #38, not quite so old but still very good:

bumsfeld 413 Nearly a Posting Virtuoso

I wonder if any candidate that admits to avoiding church visits would have any chance in hell (sorry!) to get elected?

bumsfeld 413 Nearly a Posting Virtuoso

Volkswagen Beetle -- cute little bug puddling down the road :)

Old or new type? My GF has the new type in yellow, real sharp (GF and car)!

bumsfeld 413 Nearly a Posting Virtuoso

Citroën C3 would do very nicely! Very good milage, sharp look and reliable.

Actually, I would love to drive this 1924 Citroën CV, real party car!

bumsfeld 413 Nearly a Posting Virtuoso

I am sure plane #36 is Typhoon. Saudi Arabia just ordered huge amount of them.

Here is plane #37, an oldy but goody:

bumsfeld 413 Nearly a Posting Virtuoso

Compared to Java, Python has simplified a lot of the syntax. It will spoil you, and you may actually have fun.

bumsfeld 413 Nearly a Posting Virtuoso

Python makes it easy to compare two files and check if they are equal or differ:

# compare two files and check if they are equal
# files can be binary or text based

import filecmp

# pick two files you want to compare ...
file1 = "Boing1.wav"
file2 = "Boing2.wav"
if filecmp.cmp(file1, file2):
    print "Files %s and %s are identical" % (file1, file2)
else:
    print "Files %s and %s differ!" % (file1, file2)
bumsfeld 413 Nearly a Posting Virtuoso

You might want to play with the Python builtin module filecmp:

# compare two files and check if they are equal
# files can be binary or text based

import filecmp

# pick two files you want to compare ...
file1 = "Boing1.wav"
file2 = "Boing2.wav"

if filecmp.cmp(file1, file2):
    print "Files %s and %s are identical" % (file1, file2)
else:
    print "Files %s and %s differ!" % (file1, file2)
bumsfeld 413 Nearly a Posting Virtuoso

You need to study up on argument passing to and from functions. I put some comments into your code to help you:

def ask_hours():
    hours = float(raw_input ("How many hours did you work? "))
    rate = float(input ("What is your rate of pay? "))
    # return the two arguments as tuple
    return hours, rate

def findrate(hours, rate):
    if hours <= 40:
        pay = hours * rate
        overtime = 0.0
    if hours > 40:
        pay = 40 * rate
        overtime = (hours - 40) * (rate * 1.5)
    totalpay = pay + overtime
    print "You earned", pay, "regular pay and", overtime, \
        "overtime pay which is a total of", totalpay

def main() :
    # note that the function returns two arguments
    hours, rate = ask_hours()
    # pass the two arguments to this function
    findrate(hours, rate)

main()
bumsfeld 413 Nearly a Posting Virtuoso

L'anglais seulement, svp!

bumsfeld 413 Nearly a Posting Virtuoso

Try to generalize this approach:

matrix3x3 = [range(1, 4), range(4, 7), range(7, 10)]
print matrix3x3  # [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
bumsfeld 413 Nearly a Posting Virtuoso

I have gone to Area 52, and that is even more secret. Just to mention that you were there puts your life in danger. Hey, I love to live dangerously!

bumsfeld 413 Nearly a Posting Virtuoso

Wonder how Americans will react to all the price increases and lost jobs come election time? Who would they favor, McCain or Hillobama?

bumsfeld 413 Nearly a Posting Virtuoso

In typical office high-rise, the elevators consume nearly half of the electricity used by the total building.

bumsfeld 413 Nearly a Posting Virtuoso

Congrats to the many folks who were correct, plane #25 is Indian made Tejas.

I have flown in hot air balloon - was awesome too. Very quiet, could hear all the sound from the ground, people talking, dogs barking, and deer running in the woods.

On the low fly surprise, did the Germans pay for all the soiled underwear?

May I present plane #28 to you:

bumsfeld 413 Nearly a Posting Virtuoso

Love hurts, too much...............

$50 million worth of hurt in the case of Paul McCartney!

bumsfeld 413 Nearly a Posting Virtuoso

Argentina used to have 1200% annual inflation rate. It wouldn't take long to create trillionairs.

bumsfeld 413 Nearly a Posting Virtuoso

I read that McCain hates the UN, and loves to bomb other countries into submission.