Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Lesson 4 Group Activities This activity is worth 10 total points This lesson's Group Activities are (do both 1. Write a program which simulates rolling

image text in transcribed
image text in transcribed
Lesson 4 Group Activities This activity is worth 10 total points This lesson's Group Activities are (do both 1. Write a program which simulates rolling dice It should Display the random number rolled Ask the user if they want to roll again. If they don't want to roll again, the program should end. If they do want to roll again the new number should display At a minimum, the die should have 6 sides, but if you want to use a d12 or 020, that is fine too. 2. Write a program which gives an easy mathematics quiz. The program should display two random numbers which are to be added together, like this 117 + 213 The program should ask the user to enter their answer. If the answer is correct, the user should be congratulated. If the answer is wrong the right answer should be displayed and the user should be scolded. Don't forget to: Generate random numbers Ask the user if they want to be tested again. If they don't want another math problem, the program should end. If they do want to try again, the new problem should display Helpful hint don't forget about input validation loops. They are very useful when used in conjuction with functions. You are to: 1. Post your code for each exercise in the Lesson 4 Group Activities discussion board 2. Respond to your classmates, providing assistance or commentary as needed 3. Follow the guidelines for Group Activities which are found under Course information Lesson 4 Lab This activity is worth 10 total points This week's Labis Rock Paper, Scissors Write a program which let's the user play rock, paper, scissors against the computer. It should Ask for the users name, utilize in output for scoring and messages Randomly generate the computer's choice ("rock", "paper" or "scissors") Ask the user to enter their choice (rock', "paper" or "scissors) Display the computer's choice Compare the choices, then determine a winner 6 rock beats scissors o paper beats rock o scissors beat paper o a tie results in a do-over until a winner is declared The winner (user or computer) gets a point After each round, display the total score for the user and the computer Ask if the user wants to play again If yes, then display another round if no, then display the total number of rounds played and the final score Helpful hint: use numbers to represent the computer's choices. For example: Trock, 2-scissors, 3 paper. This can make it easier to randomly generate the computer's choice You are to: 1. Work through this Lab on your own ino peer help on this one!) 2. Submit your own completed Lab file(s) here (click the link above)

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

Database Security XI Status And Prospects

Authors: T.Y. Lin, Shelly Qian

1st Edition

0412820900, 978-0412820908

More Books

Students also viewed these Databases questions