Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello! I need help coral coding rock paper scissors, there are a few similar questions on this site that dont work anymore when plugged in

Hello! I need help coral coding rock paper scissors, there are a few similar questions on this site that dont work anymore when plugged in. So using coral code (theres a free coral code simulator on the website). So can i please get a usable functional coral code for rock paper scissors. Below are some specifications for this assignment!
etermine the variables and relevant data types of each variable. Consider the necessary variables required to implement the logic of your game, as well as the relevant data type (i.e., integer or float) of each variable.
Initialize the variables using appropriate data values. Where necessary, assign an initial value to each variable. Note that variables that obtain an initial value from user input do not require initializing. For example, before you start simulating any of the games, there should be zero wins and losses.
Set branches that use conditionals to define the logic of the game. This must meet the requirements of the program. You may use the following types of statements to accomplish this:
IF
IF-ELSE
IF-ELSE-IF
Statements must also use the appropriate relational operators, which are as follows:
==(equals)
!=(not equal)
<(less than)
>(greater than)
<=(less than or equal)
>=(greater than or equal)
Create loops to define the logic, flow, and sequence of the game. This must meet the requirements of the program. Reference the Brief Tutorial on Coral, linked in the Supporting Materials section, for a reminder of how to create loops in Coral. Use WHILE or FOR loops along with the appropriate relational operators (==,!=,<,>,<=, and >=). Avoid infinite loops by ensuring the loop has an exit condition using the appropriate relational operator.
Rock-Paper-Scissors: This game will include looping 10 times. Determine what loop to use, then execute it based on program requirements.
Apply necessary arithmetic operations. Note that mathematical operators include +,-,*,/, and %(modulo). These must meet the requirements of the program. See specific examples below for reference:
Rock-Paper-Scissors: Keep track of the number of times the player has won in the Rock-Paper-Scissors game.
Ensure there are no syntax errors in your code. Use the Coral simulator to make sure there are no syntax errors that prevent your code from running. Fix any syntax errors that may arise so that your code can execute.
Determine whether your code functions correctly. Check for logic errors using the Coral simulator by testing it with several different input values to ensure it executes correctly. The Coral simulator will automatically check your code as you enter it, so now you are checking for things it might not pick up on. Also recall that you have already created a flowchart in Project One. Now the Coral simulator will automatically create a flowchart for the code you have built. Be sure to toggle to the flowchart and check it against what you have already created to ensure the design matches your intention. Fix any issues that arise during this testing process. Your updates should result in a functioning program with proper outputs based on the logic of the game.
Write code using best practices including appropriate syntax and commenting. This includes the following:
Using descriptive names for your variables
Using the correct formatting structure with appropriate indentations
Using appropriate comments relating to your code

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

Statistical And Scientific Database Management International Working Conference Ssdbm Rome Italy June 21 23 1988 Proceedings Lncs 339

Authors: Maurizio Rafanelli ,John C. Klensin ,Per Svensson

1st Edition

354050575X, 978-3540505754

More Books

Students also viewed these Databases questions

Question

What is human nature?

Answered: 1 week ago