Cracked Egg Game: There are a dozen eggs in a basket; some are hard boiled and some are raw. The object of this game is for the user to guess the number of hard-boiled eggs prior to playing the game. The computer then simulates cracking all 12 eggs, using a random number 0 or 1 to simulate raw or hard boiled. The number 0 should represent raw eggs and the number 1 should represent hard boiled. The computer must keep track of the number of hard-boiled eggs. At the conclusion of cracking all 12 eggs, the actual number of hard boiled is compared to the user’s guess, and whether the user won or lost is given as output. The goal of this milestone is to use Coral to program one of the loops you will need for your finalized program in Project Two. This will help you define the logic, flow, and sequence of the game. For this work, you will write code in Coral for your selected programming game by accessing the activity in the zyBook. Note that links for each are provided in the Scenario section. The work you complete will be based on your flowchart and pseudocode designs from Project One. Be sure to refer to any feedback you received for Project One prior to beginning coding in Coral. Specifically, you must address the following rubric criteria: Determine 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 (e.g., integer or float) of each variable. Consider your inputs and outputs for the program as you work. 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 a branch that uses conditionals to define the logic of the game. This must meet the requirements of the program. This includes using the following: 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 one loop 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 this week’s Resources section, for a reminder of how to create loops in Coral. Use a WHILE or FOR loop and the appropriate relational operators (==, !=, <, >, <=, and >=). Avoid infinite loops by ensuring the loop has an exit condition using the appropriate relational operator. Cracked Egg Game: Write code that will determine if one egg is hard boiled or raw. Spaceship Race: Write code that will apply a “boost” value to one spaceship in the race toward the distant star. Rock-Paper-Scissors: Write code that will play the game once. Apply necessary arithmetic operations. Note that mathematical operators include +, -, *, /, and % (modulo). This must meet the requirements of the program. For example, in each of the games, you will want to keep track of wins and losses. Cracked Egg Game: Keep track of whether the hard-boiled egg or raw egg was chosen. Spaceship Race: Keep track of the distance traveled in the first round. Rock-Paper-Scissors: Keep track of the player who won the first round in the Rock-Paper-Scissors 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

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

THIS MUST BE DONE IN CORAL:

  1. Cracked Egg Game: There are a dozen eggs in a basket; some are hard boiled and some are raw. The object of this game is for the user to guess the number of hard-boiled eggs prior to playing the game. The computer then simulates cracking all 12 eggs, using a random number 0 or 1 to simulate raw or hard boiled. The number 0 should represent raw eggs and the number 1 should represent hard boiled. The computer must keep track of the number of hard-boiled eggs. At the conclusion of cracking all 12 eggs, the actual number of hard boiled is compared to the user’s guess, and whether the user won or lost is given as output.

The goal of this milestone is to use Coral to program one of the loops you will need for your finalized program in Project Two. This will help you define the logic, flow, and sequence of the game.

For this work, you will write code in Coral for your selected programming game by accessing the activity in the zyBook. Note that links for each are provided in the Scenario section. The work you complete will be based on your flowchart and pseudocode designs from Project One. Be sure to refer to any feedback you received for Project One prior to beginning coding in Coral.

Specifically, you must address the following rubric criteria:

  • Determine 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 (e.g., integer or float) of each variable. Consider your inputs and outputs for the program as you work.
  • 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 a branch that uses conditionals to define the logic of the game. This must meet the requirements of the program. This includes using the following:
    • 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 one loop 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 this week’s Resources section, for a reminder of how to create loops in Coral. Use a WHILE or FOR loop and the appropriate relational operators (==, !=, <, >, <=, and >=). Avoid infinite loops by ensuring the loop has an exit condition using the appropriate relational operator.
    • Cracked Egg Game: Write code that will determine if one egg is hard boiled or raw.
    • Spaceship Race: Write code that will apply a “boost” value to one spaceship in the race toward the distant star.
    • Rock-Paper-Scissors: Write code that will play the game once.
  • Apply necessary arithmetic operations. Note that mathematical operators include +, -, *, /, and % (modulo). This must meet the requirements of the program. For example, in each of the games, you will want to keep track of wins and losses.
    • Cracked Egg Game: Keep track of whether the hard-boiled egg or raw egg was chosen.
    • Spaceship Race: Keep track of the distance traveled in the first round.
    • Rock-Paper-Scissors: Keep track of the player who won the first round in the Rock-Paper-Scissors 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

// Declare variables here


// Uncomment the line below when implementing your program
//SeedRandomNumbers(2)

// Type your code here

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

what is the psuedocode for the cracked egg game?

Solution
Bartleby Expert
SEE SOLUTION
Follow-up Question

flow cgart

Solution
Bartleby Expert
SEE SOLUTION
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY