In this lab we will be combining our efforts in top-down programming, where we deliberately organize and structure our code with main functions and sub functions, but will also add in our skills in Graphic User Interface (GUI). We continue to build abstraction – where a few small, simple and concrete tasks are packaged together to perform a more general task. The top-down approach helps us organize our code like an outline organizes our writing. Again, we start with an algorithm (chart), then translate it into pseudocode of comments and function name definitions.
In the last lab you created code to play Rock-Paper-Scissors. You will be working with the same code (modify to resolve comments from your last lab), but rather than using input() you will now collect input using the GUI. Be creative about displaying messages to the player.
Submittal to Turnitin.com
Because plagiarism in coding is dishonest, unethical, and is against the Miramonte Honesty Policy, you are required to submit your code to Turnitin.com. Make a Google Doc with your final code for Rock-Paper-Scissors and Word Jumble, and submit it to turnitin.com, Lab #8.
Problem #1 – Rock-Paper-Scissors Reprise (with GUI)
1. Display messages on the canvas that explain to the user how to choose Rock, Scissors, or Paper. They may not input their choice with any text input box.
2. Once the player makes their selection, have the computer make a selection. Display both the player’s and computer’s selection on the Canvas (it is good programming practice to also display on the console to help you debug).
3. Display the outcome (“You win!” or “Computer wins!”)
4. Tally and update the score after each iteration of the game.
5. You do not have to ask the user to play again… you can assume they will, but do give them some method to Quit when they are ready.
6. When they quit, display a parting message and the final score.
As you solve a problem or write a computer program, the process should be:
1. Understand the task/purpose of code
2. Organize main task into sub-tasks and consider task flow (sequencing)
a. Create flow structure with an algorithm flow chart (whiteboard!). Consider collaborating with a programming partner as you plan.
b. Create pseudocode outline with comments, naming key flow functions.
3. Build, code and test sub-functions first. Debug as you go. Revise plan/structure as necessary.
4. Combine sub-functions into larger program and test, test, test! Revise plan as necessary.
5. Consider extensions or improvements to original design.
Keep your words to 5 and 6 letters each. This is like the Jumble in the newspaper and online games and will make the GUI display easier and more aesthetically pleasing.
You need to create a program that allows a user to guess a word that has been jumbled together. This project focuses on Strings and String manipulation, as well as presenting output with the GUI.
Once you have a working game using the input() and console, you will now modify it to include GUI.
You will create a GUI (similar to the one below). You should be able to use the majority of your code from part 1 for the underlying logic, however you may need some new variables and a draw handler to make the GUI display correctly. Remember all your print statements must be turned into variables that can be displayed on the canvas.