Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

To begin working on this assignment, first select one of the project scenarios that you did not already design a flowchart, pseudocode, and code for.

To begin working on this assignment, first select one of the project scenarios that you did not already design a flowchart, pseudocode, and code for. Then begin thinking about how you would design one loop for the game you have selected.
Specifically, you must address the following rubric criteria:
Explain how you would write code for one loop in the selected game. Be sure to mention any strategies you would need to use in your design. Remember that your loop will need to meet the requirements of the program. You should use a WHILE or a FOR loop along with the appropriate relational operators (==,!=,<,>,<=, and >=). Using the appropriate relational operators will also be important in ensuring there is an exit condition, so no infinite loops are created. As you work, you may wish to try sketching out a flowchart or drafting pseudocode to support your ideas. You do not need to create any code for this assignment, but you can also try out some practice code in the zyBook, which you can access in the links below. Doing this will help you analyze your thought process and check whether you are on the right track, if you choose. Focus on one of the following loops:
Cracked Egg Game: Consider code that will determine if one egg is hard boiled or raw.
Spaceship Race Game: Consider code that will apply a boost value to one spaceship in the race toward the distant star.
Rock-Paper-Scissors Game: Consider code that will play the game once.
Discuss the differences and similarities between coding strategies used in each scenario. Consider the work you completed in your projects along with how you would design code for one loop of the new scenario you have chosen. Compare the two scenarios and explain why similar or different strategies might be used. For example, think about whether you would need to use a different type of loop.
Discuss potential challenges in coding the loop. If you were to create code for the entire new scenario you selected, what do you think would be challenging and why? Also think about potential ways to overcome those challenges as you design. The strategies you consider here could end up being useful in other future code designs as well. You may wish to discuss planning ahead with a flowchart and pseudocode. You may also wish to discuss methods you would use to keep your code organized.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Databases In Action

Authors: Dave Bechberger, Josh Perryman

1st Edition

1617296376, 978-1617296376

More Books

Students also viewed these Databases questions