Strathit.files.wordpress.com



The Final FrontierSpace, the Final Frontier!Spock?would like to greet people based on where they are. Write a program to help him identify beings based on their location - if they’re in empty space, or if they’re earth-bound. Spock greets earth-bound beings with?Greetings, Earthling!, and greets beings in empty space with?The Final Frontier!.If a being is earth-bound, they will respond to Spock's question with some text. For example:Where are you? Sydney, AustraliaGreetings, Earthling!Here is a second example:Where are you? The north poleGreetings, Earthling!If a being is in empty space, they will respond by only entering some number of spaces. In this example, the user enters three spaces:Where are you? The Final Frontier!Br###k##n K##yb0%%rdYour friend's keyboard is misbehaving, and her "a", "e", and "o" keys are broken.To compensate, when she wants to type an?o, she types?###. For an?e?she types?##, and for an?a?she types?%%. Being fed up with trying to interpret this ridiculous code, you decide to write a program to decipher her code instead.Write a Python program to read in some text typed by your friend, and output the corrected text. For example:What did she say? My k##yb0%%rd is br###k##n :(She meant to say: My keyb0ard is broken :(You can assume there will never be two vowels directly next to each other in the input text.Multiplication DrillComputers can perform calculations extremely quickly and accurately, but it's often handy to calculate with the computers we carry around inside our heads.Image sourceWrite a program to drill you in multiplication tables. Your program should read a single line of input containing an integer, and print out the multiples of that number up to 12 times that number.Here is an example interactive session between your program and a user:Enter a number: 33 x 1 = 33 x 2 = 63 x 3 = 93 x 4 = 123 x 5 = 153 x 6 = 183 x 7 = 213 x 8 = 243 x 9 = 273 x 10 = 303 x 11 = 333 x 12 = 36 ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download