Aoccdrnig to a rscheearch at an Elingsh uinervtisy, it deosn’t mttaer in waht oredr the ltteers in a wrod are, the olny iprmoetnt tihng is taht frist and lsat ltteer is at the rghit pclae. The rset can be a toatl mses and you can sitll raed it wouthit porbelm. Tihs is bcuseae we do not raed ervey lteter by itslef but the wrod as a wlohe.
You are going to write a computer program that will convert normal plain english into letters scrambled as described above.
Task 1 (5Mins)
In a new word document saved as scrambledLetters using example explain what you have been asked to do.
Task 2 (5Mins)
Write down three success criteria for your program
Task 3 (80Mins)
Write a computer program to take as input, text provided by the user, and produce the text in this fashion.
If you are having problems use the Grok Hint Sheet, PythonForBiologists Problem Flowchart and do some research into Python Shuffle. Here is an example of Python Shuffle
Task 4 (10Mins)
Test your program and screengrab evidence of your code and testing to your word document.
Make it possible for your program to open a file convert the contents into Scrambled Letters and then save the encoded content to a new file.
A Possible Approach
One style of programming is Rapid Application Development or RAD. This type of programming encourages programmers to get something working quickly even if it is a simlified solution. They will then add further complexity again and again until they reach their end goal. For this program it could be achieved by:
- Write a program that takes an input and prints it to the screen
- Modify your program so you isolate the first, last and middle letters into their own variables. Output these to the screen.
- Scramble the middle of the word using shuffle.
- Put all three parts back together again.
- Modify your code so it will loop through each word in a sentance.
- Modify your program so it will open a file putting the contents into a variable. Pass this variable to your program for scrambing.
- Redirect the output into a new file and not the screen.