This Forum has been archived there is no more new posts or threads ... use this link to report any abusive content
==> Report abusive content in this page <==
Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
NEED HELP WITH PYTHON HELP!!!?
10-03-2012, 11:39 AM
Post: #1
NEED HELP WITH PYTHON HELP!!!?
I am making a simple program and need the following script..
I need to get the script for
Number One
Person: Hello!
Computer: Who's there?
Person: Hello
Computer: Hello who?
Person: Computers shouldn't cry
Computer:You got me.
NOTE: The parts where it says Person means that the user would be typing in the thing it can be anything they want. But if it does not start withe Knock, Knock they would get straight away..

Computer: Sorry, I only talk to people that say'knock knock' jokes.

Number Two
One of the many problems that internet-dwellers have nowadays is where to share their thoughts online. Your task is to write a program to advise someone on whether they should send their writing to Twitter, Facebook or their blog depending on how many characters they've written.
Twitter has a limit of 140 characters, so if the post is quite short, a sample interaction with your program should look like this:

How many characters did you write? 42
That belongs on Twitter.

Although Facebook currently has a limit of 63 206 characters in a status update it's generally considered polite to stick to less than 5000 characters for status updates. So if the post is too long for Twitter but less than 5000 characters your program should work like this:

How many characters did you write? 307
That belongs on Facebook.

If the post is too long for both Twitter and Facebook, your program should print That belongs on your blog.

Number Three

Polly the parrot is very good at talking, but she doesn't understand what she's saying. All she ever wants is food, and the more she chatters the more food she wants!
Every 10 characters of Polly's 'speech' is equivalent to her wanting one cracker. However, if we give her less than a whole cracker she gets angry. For example, even if she only says she wants 1.5 crackers (or even 1.1!), it's best to give her 2. In preparation for the soon to be written parrot speech recognition system, you need to write the back-end code for our automatic parrot food dispenser. It should work as follows:

Parrot: pieces of eight pieces of eight
CRACKER CRACKER CRACKER CRACKER

Here, Polly 'said' 31 characters, which means we should give her 4 crackers.
Or if Polly isn't saying much:

Parrot: squawk
CRACKER

Of course, if Polly doesn't say anything, you don't need to do anything either. You should just print out a blank line.

Number Four



Companies such as Facebook, Google and Microsoft are very interested in how much energy their data centres use. One way of measuring how energy-efficient your servers are is with JouleSort, where a computer system is rated by how much energy it uses to sort 1 terabyte of data (1012 bytes) and the energy is measured in joules, and you can see some sample numbers from state of the art systems here: http://sortbenchmark.org.
The problem with JouleSort is that the results aren't very easy to visualise, whereas it's easier to imagine a unit like "the amount of energy it takes to heat a cup of tea". We want you to write a program to convert from bytes per joule to cups of tea per terabyte. For the purposes of this question you can assume that one cup of tea is equal to 62000 joules.
Your program will read from the user the number of bytes sorted with one joule, and will print out the number of cups of tea that could have been made with the energy it took to sort a terabyte, like this:
Bytes per joule: 4370000
3.69085406363 cups of tea per terabyte
Hint
If you have a number which is measured in metres per second, you can convert it to seconds per metre by taking the reciprocal. For example, 4 metres per second is equivalent to:
14=0.25 seconds per metre
The units in this question might be a little bit strange, but the same rules apply.

EXTRA POINTS FOR THE BEST ANSWER
EXTRA POINTS
EXTRA POINTS
EXTRA POINTS
EXTRA POINTS

Ads

Find all posts by this user
Quote this message in a reply
10-03-2012, 11:47 AM
Post: #2
 
Are you joking? these are not difficult to make! There just time consuming. don't be lazy. python is an easy language to pick up and it wont take you long to lear how to make these programs. take a look at: http://www.learnpython.org/

Ads

Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 3 Guest(s)