Need a program in java that creates a random addition math quiz
The program should ask the user to enter the following
The smallest and largest positive numbers to be used when generating the questions -
The total number of questions to be generated per quiz -
The total number of the quiz's to create
Answer: here is the answer for your question :
CODE IN JAVA:
---------------------------------------------------------------------------------------------------------------------------------------------------------
import java.util.*;
public class Main
{
public static void main(String[] args) {
int smallest_number;
int largest_number;
int total_questions;
int total_no_of_quiz;
Scanner in =new Scanner(System.in);
System.out.println("Enter the smallest_numnber when
generating the questions: ");
smallest_number=in.nextInt();
System.out.println("Enter the largest_numnber when
generating the questions: ");
largest_number=in.nextInt();
System.out.println("Enter the total_questions to be
generating per quiz:");
total_questions=in.nextInt();
System.out.println("Enter the total number of
quiz:");
total_no_of_quiz=in.nextInt();
System.out.println("DATA ENTERED BY USER IS::");
System.out.println("smallest_number : "+
smallest_number);
System.out.println("largest_number : "+
largest_number);
System.out.println("total_questions : "+
total_questions);
System.out.println("total_no_of_quiz : "+
total_no_of_quiz);
}
}
---------------------------------------------------------------------------------------------------------------------------------------------------------
CODE SNIPPET:
---------------------------------------------------------------------------------------------------------------------------------------------------------
CODE OUTPUT:
---------------------------------------------------------------------------------------------------------------------------------------------------------
I hope this would help you out
If you have any doubt, you can provide comment /feedback below the answer
Thanks
Need a program in java that creates a random addition math quiz The program should ask...
Need a program in java that creates a random addition math quiz The program should ask the user to enter the following The smallest and largest positive numbers to be used when generating the questions - The total number of questions to be generated per quiz - The total number of the quiz's to create from then the program should generate a random math (Just addition) quiz from what the user entered
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...
Write a MIPS math quiz program in MARS. The program should start with a friendly user greeting. From there, it should generate a random arithmetic problem. Your program will need to generate three random things: the first and second operand and the operator to use. Your program should generate random positive integers no greater than 20 for the operands. The possible operators are +, -, * and / (division). The user should be prompted for an answer to the problem....
Create a program using the Random class and While loops in Java. The program should generate a random number from 50 through 100. The loop should add the five random numbers generated. On each iteration of the loop the program should print out the number generated, how many numbers have been generated thus far, and the sum so far. On the last iteration, the printout should say the The final total is.... Teach comment the last time I did it:...
Using Java IDE: Write an application that asks elementary students a set of 10 math problems ● First ask the user for a level and a problem type. ● You need to validate the level and problem type and loop until the user enters a correct one. ● There should be 3 levels. Level 1 operands would have values in the range of 0-9, level 2 operands would have values in the range of 0-99, and level 3 operands would...
Python please Create a menu-driven modular program so user can take a 10-question math quiz, Addition or subtraction, at specified difficulty level. Easy(1-digit), Intermediate(2-digit), and Hard(3-digit). After a quiz, display the quiz type and level, and number of correct questions user answered.
This is a Java text only program. This program will ask if the user wants to create a music playlist. If user says he or she would like to create this playlist, then the program should first ask for a name for the playlist and how many songs will be in the playlist. The user should be informed that playlist should have a minimum of 3 songs and a maximum of 10 songs. Next, the program will begin a loop...
In phyton 11. Math Quiz Write a program that gives simple math quizzes. The program should display two random numbers that are to be added, such as: 247 +129 The program should allow the student to enter the answer. If the answer is correct, a mes- sage of congratulations should be displayed. If the answer is incorrect, a message showing the correct answer should be displayed
(For Python program) Write a program that fulfills the functionalities of a mathematical quiz with the four basic arithmetic operations, i.e., addition, subtraction, multiplication and integer division. A sample partial output of the math quiz program is shown below. The user can select the type of math operations that he/she would like to proceed with. Once a choice (i.e., menu option index) is entered, the program generates a question and asks the user for an answer. A sample partial output...
Hello need assistance with Java program: You are asked to create a program that will be used to create quizzes and test users based on these quizzes. 1. Prompt a secret word and proceed if it matches a secret code. 2. Your program should have two modules: quiz creation mode and test mode. User will be prompted in the beginning to choose from these two modes. For example: “Welcome to the quiz master: please enter 1 if you want to...