
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An intriguing assignment from the university of cambridge that explores the human mind's ability to read words despite the order of their letters. The task involves creating a program that scambles text by randomly altering letters within a word while preserving the first and last letters and the case of the letters. The document also emphasizes the importance of using control structures and working with text, as well as the use of subroutines and commenting the code. Students are expected to submit a structure chart and their code electronically, along with their names and time estimates. This assignment is worth three routine homework grades and is due on april 15.
Typology: Assignments
1 / 1
This page cannot be seen from the preview
Don't miss anything!

Consider the following:
(See http://www.mrc-cbu.cam.ac.uk/people/matt.davis/cmabridge/ for more information.) This statement makes an interesting observation, but you might not be convinced by a single example. Your task is to create a program that will take the text in a file and generate a new example. You could use this to convince yourself of the validity of this statement. And in doing so, you’ll also get a lot of practice using control structures and working with text. Your code should prompt the user for names for a source file and a destination file. It should read the source file and scramble the text writing the results out to the destination file. Scrambling should be consistent with the example above. In particular, the first and last letters of a word should not be change, the case of the letters should not be altered, and punctuation should be preserved. The scrambling within a word should be random. Be sure to appropriately comment your code. Code must be organized making appropriate use of subroutines. Please submit a structure chart for your code. This may be hand drawn. Please submit your code electronically including your name as part of the file name. Don’t forget to pledge your work and include with your code times estimates for writing the code. You must work in pairs on this assignment or justify, before the fact, why you cannot work as part of a team. This project will count as three routine homework assignments. Due: Wednesday, April 1 5