Question

Problem (Computer Assisted Instruction) The use of computers in education is referred to as Computer Assisted Instruction (CA

0 0
Add a comment Improve this question Transcribed image text
Answer #1

import java.util.*;

public class Main
{
   public static void main(String[] args) {
       Scanner sc=new Scanner(System.in);
       System.out.println("Enter your name:");
       String name=sc.nextLine();
       System.out.println("\nWelcome "+name);
       Random random=new Random();
       int n1, n2;
       char input='Y';
       int response;
       int total=0, incorrect=0, correct=0, count=0;
       while(input=='Y' || input=='y'){
       n1=random.nextInt(100);
       n2=random.nextInt(100);
       System.out.println("what will be the quotient when "+n1+
       " is divided by "+n2+"?");
       response=sc.nextInt();
       int answer=n1/n2;
       if(response==answer){
       System.out.println("Well done!! Your answer is correct");
       total+=5;
       correct++;
       }
       else{
       System.out.println("Incorrect answer");
       System.out.println("The correct answer is "+answer);
       incorrect++;
       }
       count++;
       System.out.println("will you like to continue or stop?(enter y or Y to continue)");
       input=sc.next().charAt(0);
       }
       System.out.println("Thank you "+name+" !");
       System.out.println("Questions tried: "+count);
       System.out.println("Incorrect answers: "+incorrect);
       System.out.println("Correct answers: "+correct);
       System.out.println("Total Score: "+total);
      
      
   }
}

Screenshot of code

9 10 13 17 21 Main.java 1 import java.util.*; 2 3 public class Main 4-{ 5 public static void main(String[] args) { Scanner sc

Sample output screen

Enter your name: Sukhman Welcome Sukhman what will be the quotient when 97 is divided by 90? 1 Well done!! Your answer is cor

Add a comment
Know the answer?
Add Answer to:
Problem (Computer Assisted Instruction) The use of computers in education is referred to as Computer Assisted...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Need urgently.Plz use math.random() formula for random numbers and show the output as recquired. Problem (Computer...

    Need urgently.Plz use math.random() formula for random numbers and show the output as recquired. Problem (Computer Assisted Instruction) The use of computers in education is referred to as Computer Assisted Instruction (CAI). Develop a Java application that can help an elementary school student learn division of two decimal integer numbers. When the application is launched, its behaviour should be like as described: 1. The application should welcome the learner and ask if ready to learn the topic. Assume the application...

  • Please put the outputs with it also I want to make sure it runs thanks Project-Computer-Assisted...

    Please put the outputs with it also I want to make sure it runs thanks Project-Computer-Assisted Instruction (50 points) use of computers in education is referred to as computer-assisted instruction (CAl) should then Writ e a program that will help an elementary school student learn multiplication. Use the rand function to produce two positive one-digit integers. The program prompt the user with a question, such as How much is 6 times 7? The student then inputs the answer. Next, the...

  • Programming in C: Write a program that will help an elementary school student learn multiplication. Use...

    Programming in C: Write a program that will help an elementary school student learn multiplication. Use the random number generator to produce two positive integers between 1 and 12 inclusive. It should then type a question such as:             How much is 6 times 7? The student then types the answer. Your program checks the students’ answer. If it is correct, print a message such as Very good!   If the answer is wrong, print a message such as No. Please...

  • Programming Project 3 See Dropbox for due date Project Outcomes: Develop a Java program that uses:...

    Programming Project 3 See Dropbox for due date Project Outcomes: Develop a Java program that uses: Exception handling File Processing(text) Regular Expressions Prep Readings: Absolute Java, chapters 1 - 9 and Regular Expression in Java Project Overview: Create a Java program that allows a user to pick a cell phone and cell phone package and shows the cost. Inthis program the design is left up to the programmer however good object oriented design is required.    Project Requirements Develop a text...

  • This C++ Program consists of: operator overloading, as well as experience with managing dynamic memory allocation...

    This C++ Program consists of: operator overloading, as well as experience with managing dynamic memory allocation inside a class. Task One common limitation of programming languages is that the built-in types are limited to smaller finite ranges of storage. For instance, the built-in int type in C++ is 4 bytes in most systems today, allowing for about 4 billion different numbers. The regular int splits this range between positive and negative numbers, but even an unsigned int (assuming 4 bytes)...

  • #include<stdio.h> #include<stdlib.h> #include <time.h> int main() { /* first you have to let the computer generate...

    #include<stdio.h> #include<stdlib.h> #include <time.h> int main() { /* first you have to let the computer generate a random number. Then it has to declare how many tries the user has for the game loop. we then need the player to enter their guess. After every guess we have to give an output of how many numbers they have in the right location and how many they have the right number. The player will keep guessing until their 10 tries are...

  • Project 4: Month-end Sales Report with array and validation Input dialog box for initial user prompt...

    Project 4: Month-end Sales Report with array and validation Input dialog box for initial user prompt with good data and after invalid data Input OK Cancel Input dialog boxes with sample input for Property 1 Ingut X Input Enter the address for Property 1 Enter the value of Property 1: OK Cancel Input dialog boxes after invalid data entered for Property 1 Error Please enter anmumber greater than D Ester the walue of Peoperty t Console output END SALES REPORT...

  • please use python and provide run result, thank you! click on pic to make it bigger...

    please use python and provide run result, thank you! click on pic to make it bigger For this assignment you will have to investigate the use of the Python random library's random generator function, random.randrange(stop), randrange produces a random integer in the range of 0 to stop-1. You will need to import random at the top of your program. You can find this in the text or using the online resources given in the lectures A Slot Machine Simulation Understand...

  • Assignment 5 will be way different. It will be more like what you will receive in...

    Assignment 5 will be way different. It will be more like what you will receive in a programming shop. By that I mean that some things are built for you and others you will need to create or finish. P.S. part of your grade will include: Did you add in the required files? Did you rename your project? does your linear searches work? Did you put your code in the correct modules? did you change modules that you weren't supposed...

  • JAVA Problem: With the recent news about data breaches and different organizations having their clients’ information...

    JAVA Problem: With the recent news about data breaches and different organizations having their clients’ information being exposed, it is becoming more and more important to find ways to protect our sensitive data. In this program we will develop a simple tool that helps users generate strong passwords, encrypt and decrypt data using some cyphering techniques. You will need to create two classes. The first class is your driver for the application and contains the main method. Name this class...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT