Hello to you, too
Write a program that asks the user's name, then prints:
Enter your name: Tara
Make sure you give raw_input the same prompt message that is used in the example interaction above.
I'm Sorry, Dave
In the 1968 classic science fiction film 2001: A Space Odyssey, the sentient on-board computer, HAL 9000, goes rogue and tries to kill all of the crew on the Discovery One spacecraft.
HAL 9000 speaks in a very soft manner. During the movie, he rejects commands from crewman David "Dave" Bowman by saying I'm sorry, Dave. I'm afraid I can't do that. You can hear this audio snippet here.
Write a Python program to output what HAL 9000 would say to any person. Your program should read in the name of a person, and adjust the output accordingly. For example:
Enter your name: Chloe
I'm sorry, Chloe. I'm afraid I can't do that.
You speak Yoda
To speak like Yoda you just need to know a little bit of linguistics. Yoda switches the order of the subject (the doer),verb (doing word) and object (the done to word) in English sentences. With many sentences we can mimic this by moving the verb and object from the end to the beginning of the sentence. Give it a go!
Write a program that coverts a simple 4 word sentence to Yoda-speak by moving the last two words of the sentence to the front.
It should work like this:
Word 1: he
Word 2: is
Word 3: your
Word 4: father
Yoda: your father he is
This is a fun problem to test, so here's another one:
Word 1: I
Word 2: can
Word 3: help
Word 4: you
Yoda: help you I can
What linguists think about Yoda
Linguists talk about sentences in terms of... [continues]
Cite This Essay
(2012, 02). Idkasas. StudyMode.com. Retrieved 02, 2012, from http://www.studymode.com/essays/Idkasas-915611.html
"Idkasas" StudyMode.com. 02 2012. 02 2012 <http://www.studymode.com/essays/Idkasas-915611.html>.
"Idkasas." StudyMode.com. 02, 2012. Accessed 02, 2012. http://www.studymode.com/essays/Idkasas-915611.html.