13. PowerBall Lottery To play the PowerBall lottery, you buy a ticket that has five numbers in the range of 1-69, and a "PowerBall" number in the range of 1-26. (You can pick the numbers yourself, or you can let the ticket machine randomly pick them for you.) Then, on a specified date, a winning set of numbers is randomly selected by a machine. If vour first five numbers match the first five winning numbers in any order, and your PowerBall number matches the winning Pow- erBall number, then you win the jackpot, which is a very large amount of money. If your numbers match only some of the winning numbers, you win a lesser amount, depending on how many of the winning numbers you have matched.
Q: 1. [LO 1, LO 2, LO 3 & LO 4, Treasure Hunter Description You are in front of a cave that has…
A: Answer: I have done code and also I have attached code and code screenshot as well as output
Q: Q3. (Dice Rolling) Write a program that simulates the rolling of two dice. The program should use…
A: Given:
Q: 4. Area of a Rectangle • Write a program that compares the area of two rectangles. You can do this…
A: len_rect1 = float(input("Enter the length of first rectangle: ")) # taking the length of rect1…
Q: (PYTHON) A nutritionist who works for a fitness club helps members by evaluating their diets. As…
A: - We yave to help the nutritionist with the code.
Q: 3.17 (Game: scissor, rock, paper) Write a program that plays the popular scissor–rock–paper game.…
A: Answer :
Q: (Prism Program) Write a program that can calculate the value of the surface area and volume of a…
A: As Programming language is not mentioned, taking C as reference. Inputs : Lenght, Width and Height…
Q: Credit Card Number CheckThe last digit of a credit card number is the check digitwhich protects…
A: Note : I have used java programming language since it is not mentions which language to be used to…
Q: Alphabetic Telephone Number Translator Many companies use telephone numbers like 555-GET-FOOD so the…
A: Program: // Import the required packagesimport java.util.Scanner;import java.lang.String;// Class…
Q: 1- Get a number from user. 2- If the number is not divisible by 5 then find out how much more you…
A: Summary: In this question, we have to write a program in C++. In the program, we have to take a…
Q: Questioin: Hidden Secret Problem! In this problem, you are given two names, you have to find…
A: Program Plan: Enter the number of cases. Enter the two strings for each case. Convert both the…
Q: Bob takes medication three times a day. In the morning at 8:00, in the afternoon at 13:00, and in…
A: The Enum in C is a data type which contains a fixed set of constants. The enum constants are…
Q: Alphabetic Telephone Number Translator Many companies use telephone numbers like 555-GET-FOOD so the…
A: Python: It is one of the easiest programming language. It is a concise (less)code. It is a…
Q: (Comparing Integers) Write a program that prompts the user to enter the edges of a triangle and…
A: PROGRAM CODE: #include<iostream>using namespace std;int main(){ int side1, side2, side3; cout…
Q: Enter the number of days: Day Cents $ 0.01 2 $ 0.02 3 $ 0.04 4 $ 0.08 $ 0.16 $ 0.32 $ 0.64 $ 1.28 $…
A: Find Your Code Below
Q: Write a program that calculates your grade in this class based on weights for each category and…
A: Algorithm Start Recieve input score from user for reading assignment and assign it to a variable(…
Q: Dice game Rules of the game: The players roll three dice, and the program adds the sides that turn…
A: Coded using Python 3.
Q: Widgets and Gizmos An online retailer sells two products: widgets and gizmos. Each widget weighs 75…
A: code is given below:
Q: Magic Number Programming: Magic program ask user to enter three integers by the user, the three…
A: # include<stdio.h> void magic(int left, int right, int digit) // the function to generate…
Q: What is the output of the following code?
A: The ostream class is represented by the C++ cout expression. It's utilized to generate output for…
Q: **3.23 (Geometry: point in a rectangle?) Write a program that prompts the user to enter a point (x,…
A: C++ Program for above : #include <iostream> using namespace std; int main() { int…
Q: Travel Tickets Company sells tickets for airlines, tours, and other travel-related services. Because…
A: Required: write an application that indicates invalid ticket number entries. The class prompts a…
Q: Twin primes are a pair of prime numbers that differ by 2. Forexample, 3 and 5 are twin primes, 5 and…
A: Program: //include header file import java.util.Scanner; //definition of main class public class…
Q: PLEASE CODE IN PYTHON The Penny Pitch game is popular in amusement parks. Pennies are tossed onto a…
A: The code is written in python as follow as :
Q: Nice Number Programming: Nice program ask user to enter three integers from keyboard (java console),…
A: Below is the required java program. Program Approach: Import necessary packages to get the standard…
Q: 10) The assignment statement p = d; is legal even though p is not a Dog.
A: Please see the next step for solution
Q: The Fibonacci series is a series that begins with 0 and 1 and has the property that each succeeding…
A: PROGRAM CODE: #include <iostream> // include header file for input output stream…
Q: Mathletes Game! With the introduction of loops, we now know enough about programming to begin…
A: Please check the below c++ code
Q: Magie Number Programming: Magic program ask user to enter three integers by the user, the three…
A: Given: Magic program ask user to enter three integers by the user, the three integers represent left…
Q: Part D: Field Trip You only get to go on your field trip if you bring back a signed permission slip.…
A: Program Explanation: 1) Implement the header file. 2) Use an if-else statement. 3) Print the output.…
Q: Beautiful Strings Programming challenge description: When John was a little kid he didn't have much…
A: Actually, java is a object oriented programming language. It is a platform independent.
Q: Birthday party At Lili's birthday party, there was a game arranged by Jojo as the host. That game…
A: C++ Program for above : #include <bits/stdc++.h> using namespace std; int solve(int x,…
Q: 5. Alphabetic Telephone Number Translator Many companies use telephone numbers like 555-GET-FOOD so…
A: Python program code: a=input("Enter a telephone number XXX-XXX-XXXX: ") #user inputb=a.split('-')…
Q: 4.33 - (Perfect number) A positive integer is called a perfect number if it is equal to the sum of…
A: A perfect number is the sum of all the divisors less than n is equal to the n value then n is called…
Q: Write method IsEven that uses the remainder operator (%) to determine whether an integer is even.…
A: Program : import java.util.Scanner; public class Main { public static boolean isEven(int z){…
Q: onsider writing code that starts with the ima nage, resulting in the picture on the right be
A: var image=new Simpleimage("Chapel.png"); print(image);
Q: Python Assignment: In India McDonald's has the n number of customers and they are famous for their…
A: Required:
Q: PART 2) BRANCHING Write a quadratic equation solver. Ask the user to type in three numbers: a, b,…
A: Dear learner, hope you are doing well. I will try my best to answer this question. Thank You!!
Q: 24. Word Game Write a program that plays a word game with the user. The program should ask the user…
A: sample output
Q: 5-WRITE A PROGRAM THAT CALCULATES A STUDENT'S AVERAGE IF IT IS LESS THAN 50, SPECIFYING THE…
A: As per company guidelines we are suppose to answer only 1 question. Kindly re-post other…
Q: Python Assignment: In India McDonald's has the n number of customers and they are famous for their…
A: Coded in Python 3.
Q: Programming challenge description: When John was a little kid he didn't have much to do. There was…
A: Actually, java is a object oriented programming language. It is a platform independent.
Q: C++ code Assignment: While still in school, Sam had the ability to solve problems. Now one of his…
A: As per the given problem we are required to develop a C++ to solve the given number problem. For…
Q: V7 This pseudocode is intended to display // employee net pay values. All employees have a standard…
A: Program plan: Declare the variable name Define the variable EOFNAME as "ZZZZ" Define DEDUCTION as…
Q: Day of the Week Calculator For this assignment you will write a program that will allow you to enter…
A: Code: import java.util.Scanner; public class test { static String days[]=…
Q: Day of the Week Calculator For this assignment you will write a program that will allow you to enter…
A: To find the day of a given number in Java, the date is given as input, we will use Calendar class,…
Q: Credit Card Number Check. The last digit of a credit card number is the check digit, which protects…
A: Program approach: import the necessary packages required for scanning the input from user create a…
Q: Combine the first name, middle name, and last name and assign it as the 'fullname' of the hero. If…
A: Implementing given program in C++.
Q: Trivia Game In this programming exercise, you will create a simple trivia game for two players. The…
A: Question.py • Define the class named “Question”. ○ Define “__init__()” method for “Question”…
Q: Credit Card Number Check. The last digit of a credit card number is the check digit, which protects…
A: Actually, the code has given below:
Q: (Geometry: area of a triangle) Write a program that prompts the user to enter three points (x1, yl),…
A: Given:
I need help writing program 13 in python.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images
- 9. Trivia Game In this programming exercise, you will create a simple trivia game for two players. The program will work like this: Starting with player 1, each player gets a turn at answering 5 trivia questions. (There should be a total of 10 questions.) When a question is displayed, 4 possible answers are also displayed. Only one of the answers is correct, and if the player selects the correct answer, he or she earns a point. After answers have been selected for all the questions, the program displays the number of points earned by each player and declares the player with the highest number of points the winner. To create this program, write a Question class to hold the data for a trivia question. The Question class should have attributes for the following data: A trivia question Possible answer 1 Possible answer 2 Possible answer 3 Possible answer 4 The number of the correct answer (1, 2, 3, or 4) The Question class also should have an appropriate _…9. Trivia Game In this programming exercise, you will create a simple trivia game for two players. The program will work like this: Starting with player 1, each player gets a turn at answering 5 trivia questions. (There should be a total of 10 questions.) When a question is displayed, 4 possible answers are also displayed. Only one of the answers is correct, and if the player selects the correct answer, he or she earns a point. After answers have been selected for all the questions, the program displays the number of points earned by each player and declares the player with the highest number of points the winner. To create this program, write a Question class to hold the data for a trivia question. The Question class should have attributes for the following data: A trivia question Possible answer 1 Possible answer 2 Possible answer 3 Possible answer 4 The number of the correct answer (1, 2, 3, or 4) The Question class also should have an appropriate _…Using C# in Microsoft Visual Studio create an application that lets the user play the game of Rock, Paper, Scissors against the computer. The program should work as follows:1. When the program begins, a random number in the range of 1 through 3 is generated. If the number is 1, then the computer has chosen rock. If the number is2, then the computer has chosen paper. If the number is 3, then the computer has chosen scissors. (Do not display the computer’s choice yet.)2. The user selects his or her choice of rock, paper, or scissors. To get this input you can use Button controls, or clickable PictureBox controls displaying some of the artwork that you will find in the student sample files.3. The computer’s choice is displayed.4. A winner is selected according to the following rules:• If one player chooses rock and the other player chooses scissors, then rock wins. (Rock smashes scissors.)• If one player chooses scissors and the other player chooses paper, then scissors wins. (Scissors…
- Nim is a two-player game played with several piles of stones. You can use as many piles and as many stones in each pile as you want, but in order to better understand the game, we'll start off with just a few small piles of stones (see figure 1 below). Pile 1 Pile 1 Pile 2 The two players take turns removing stones from the game. On each turn, the player removing stones can only take stones from one pile, but they can remove as many stones from that pile as they want (please note, a player must remove atleast 1 stone from a pile during his/her turn). If they want, they can even remove the entire pile from the game! The winner is the player who removes the final stone (avoid taking the last stone - see figure 2 below). Pile 2 Pile 3 Pile 3 Let's say its Max (player 1) turn to play. Then Max can win by simply removing a stone from Pile 2 or Pile 3 Draw a game tree (upto depth level 2) for the given version of the Nim game. Please consider figure 1 as your initial game configuration/state…Birthday party At Lili's birthday party, there was a game arranged by Jojo as the host. That game is to distribute Y number of candy to X number of people where all the candy tastes sweet except for one last candy which tasted like rotten nuts. Candy distribution will be sequentially starting from position Z and if past the last position then the distribution of candy continues to the first position. Write down the person in which position will get the last candy. Input FormatThe first line of input is T, which is the number of test cases.The second row and the next number of T rows are X, Y, Z.X is the number of people to whom the candy will be distributed.Y is the number of candy available.Z is the starting position of the person to whom the candy will be distributed. Output FormatA string “Case #N: “ and a number representing the position of the person who got the last candy. Constraints1 ≤ T ≤ 1001 ≤ X, Y ≤ 1031 ≤ Z ≤ X Sample Input 43 4 13 5 24 2 24 5 2 Sample OutputCase #1: 1Case…Birthday party At Lili's birthday party, there was a game arranged by Jojo as the host. That game is to distribute Y number of candy to X number of people where all the candy tastes sweet except for one last candy which tasted like rotten nuts. Candy distribution will be sequentially starting from position Z and if past the last position then the distribution of candy continues to the first position. Write down the person in which position will get the last candy. Input FormatThe first line of input is T, which is the number of test cases.The second row and the next number of T rows are X, Y, Z.X is the number of people to whom the candy will be distributed.Y is the number of candy available.Z is the starting position of the person to whom the candy will be distributed. Output FormatA string “Case #N: “ and a number representing the position of the person who got the last candy. Constraints? ≤ ? ≤ ???? ≤ ?, ? ≤ ???? ≤ ? ≤ X Sample Input 43 4 13 5 24 2 24 5 2 Sample OutputCase #1: 1Case…
- AGU Computer Engineering Department created a new mathematical game that can be played with two people. In this game, you are given a list of random integers. At each round, the first player takes two numbers from the list and calculates the sum of these numbers. Then, the second player takes two numbers and makes the same calculation. The higher one is going to take the round and increment the score by 1. At the end of the game, who has the better score will win the game. Here are the rules for the game: There are always an even number of items on the list There are two colors for the players: Green and Red Green starts the game At each round, green plays and then red plays The player takes the first and the last numbers The game can end Tie when the scores are the same. The game will end when there is no element to take from the list Your program will simulate the rounds and find out the winner, Green or Red or Tie. The input will be two lines. Input Format…AGU Computer Engineering Department created a new mathematical game that can be played with two people. In this game, you are given a list of random integers. At each round, the first player takes two numbers from the list and calculates the sum of these numbers. Then, the second player takes two numbers and makes the same calculation. The higher one is going to take the round and increment the score by 1. At the end of the game, who has the better score will win the game. Here are the rules for the game: There are always an even number of items on the list There are two colors for the players: Green and Red Green starts the game At each round, green plays and then red plays The player takes the first and the last numbers The game can end Tie when the scores are the same. The game will end when there is no element to take from the list Your program on java will simulate the rounds and find out the winner, Green or Red or Tie. The input will be two lines. Input…Assignment Description This program will simulate part of the game of Yahtzee! This is a dice game that involves rolling five dice and scoring points based on what show up on those five dice. The players would record their scores on a score card, and then total them up, and the player with the larger total wins the game. A Yahtzee score card has two portions: The upper portion has spaces for six scores, obtained by adding up all of the 1's, 2's, 3's, etc. The lower portion has special scores for various combinations: Three of a kind -- at least 3 dice are the same number;the score is the sum of all five dice Four of a kind -- at least 4 dice are the same number;the score is the sum of all five dice Small straight -- four consecutive numbers are represented, e.g. 2345;the score is 25 points Large straight -- five consecutive numbers are represented, e.g. 23456;the score is 30 points Full House -- three of one kind, two of another; the score is 30 points Yahtzee! -- five of a kind; the…
- Output Specification The program prints out the total Calories of the selected meal, and stops executing after this output. Sample Input Соpy 1. Sample Output Сopy Your total Calorie count is 649. Explanation The customer chose Burger #2, Side #1, Drink #3 and Dessert #4.Q1: The local Driver's License Office has asked you to write a program that grades the writ- ten portion of the driver's license exam. The exam has 20 multiple choice questions. Here are the correct answers: 1. A 2. D 3. B 4. B 5. C 6. B 7. A 8. B 9. C 10. D 11. A 12. C 13. D 14. B 15. D 16. C 17. C 18. A 19. D 20. B Your program should store the correct answers shown above in an array. It should ask the user to enter the student's answers for each of the 20 questions, and the answers should be stored in another array. After the student's answers have been entered, the program should display a message indicating whether the student passed or failed the exam. (A student must correctly answer 15 of the 20 questions to pass the exam.) It should then display the total number of correctly answered questions, the total number of incorrectly answered questions, and a list showing the question numbers of the incorrectly answered questions. Input Validation: Only accept the letters A, B, C, or…Scissor, rock, paper Write a program called GameSRP.java that plays the popular scissor-rock-paper game where a scissor can cut paper, a rock kan nock a scissor and a paper can wrap a rock. The program asks the user for one of the options (1 for scissor, 2 for rock or 3 for paper) and then randomly picks one of them for the computer. It then presents if you or the computer won, or if it was a draw. If the user enters 0 the program will end and display the total score (number of wins for you and the computer and the draws). Here is a sample run: Scissor (1), rock (2), paper (3) or 0 to quit: 1 You lost, computer had rock! Scissor (1), rock (2), paper (3) or 0 to quit: 2 It's a draw! Scissor (1), rock (2), paper (3) or 0 to quit: 3 You won, computer had rock! Scissor (1), rock (2), paper (3) or 0 to quit: 1 You lost, computer had rock! Scissor (1), rock (2), paper (3) or 0 to quit: 2 It's a draw! Scissor (1), rock (2), paper (3) or 0 to quit: 3 You won, computer had rock! Scissor (1),…