our relative, who goes to primary school and has just learned the multiplication table, asks you to constantly ask him. You wanted to gamify it. The computer will randomly scan in the multiplication table and the user will write the answer on the screen. There will be 10 questions in total and at the end the number of questions, the number of correct answers and the number of wrong answers will be printed on the screen. Also write a program that will print if the percentage of success is below 80, it remained and if it is above it, it passed.
Q: Write a program that reads in two numbers typed on the keyboard and dividesthe first number by the…
A: Since programming language not mentioned using python.
Q: Write a program that reads from the user a character ('q' or 'c'). • i the character is 'c', the…
A: Since the programming language is not mentioned, we'll do it in python. The programming methodology…
Q: Write a program that will help an elementary school student learn multiplication. Use the…
A: #include <stdio.h>#include <stdlib.h>#include<time.h> //Random one digit positive…
Q: In this assignment you will write a C++ program that can figure out a number chosen by a human user.…
A: Program: #include <iostream>using namespace std;/*getMidpoint.This function accepts two…
Q: You have already been shown how to convert from base 10 to any base between 2 and 9 in class. Your…
A: We can use for loop and traverse over the base 2 number in the string format and parallelly multiply…
Q: Using python, Write a program that displays a table of inches from 1-12 and equivalent lengths in…
A: Program description: Python program that displays a conversion table of inches to corresponding…
Q: Sites like Zillow get input about house prices from a database and provide nice summaries for…
A: Given requirement, Sites like Zillow get input about house prices from a database and provide nice…
Q: a program which repeatedly reads positive numbers until the user enters -1. Once -1 is entered,…
A: It is defined as a powerful general-purpose programming language. It can be used to develop software…
Q: When analyzing data sets, such as data for human heights or for human weights, a common step is to…
A: code:- lst = []num = int(input("Enter the size of the array: "))print("Enter array elements: ")for n…
Q: Write a program that computes the equivalent resistance of a purely series and purely parallel…
A: Given: Write a program that computes the equivalent resistance of a purely series and purely…
Q: A robot is initially located at position (0, 0) in a grid [−5, 5] × [−5, 5]. The robot can move…
A: Program code: //include the required header files #include <iostream> /* srand, rand */…
Q: Write a program that reads an arbitrary number of integers that are in the range 0 to 50 inclusive…
A: ## As no programming language mentioned, the code is written in Python. f_dict = {}…
Q: In this program you will ask the user for 4 integers that represent two fractions. First ask for the…
A: function main: Start Declare a, b, c, d, sum Display "What is the numerator of the first fraction?…
Q: In this task, you are required to write a code which takes as an input an angle [0°, 90°] in radians…
A: Step 1 : Start Step 2 : In the main function , Take user input for the value of the angle in radians…
Q: Write a program that reads a floating point number and prints "zero" if the number is zero.…
A: The python program for the given question is detailed below.
Q: Write a program which repeatedly reads several people's height numbers in cm(centimeter) until the…
A: As no programming language is mentioned, it was implemented using simple Python
Q: Write a program that first reads the value n, which is the number of numbers to average. It should…
A: Check the python code below.
Q: When analyzing data sets, such as data for human heights or for human weights, a common step is to…
A: Below is the required C program: - Approach: - Define the header file. Define the main function.…
Q: ou are given task to write numbers from m to n, during this task how many times do you write digit…
A: This is the C program: // C program to count 2s from 0 to n #include <stdio.h>#include…
Q: Write a program that first asks the user which Temperature scale conversion would he like to…
A: As no programming language is mentioned, it is solved using basic C++
Q: We want to write a Python program for n players, which are playing a tournament. In this competition…
A: code : import randomn = int(input("enter number of players: "))for i in range(1,n+1):…
Q: Write a program, which takes a positive integer as input, and prints which powers of 2 does the…
A: I give the code in C (as you have not mentioned any language) along with output and code screenshot
Q: Write a program that prompts the user to read two integers and displays their sum. Your program…
A: import java.util.InputMismatchException; import java.util.Scanner; public class Exercise_02 {…
Q: Write a program that asks for two numbers. After the input of two numbers, ask the user what…
A: /******************************************************************************…
Q: Write a temperature-conversion program that gives the user the option of converting Fahrenheit to…
A: Start Input choice If Choice is 1 Then convert Temperature from Fahrenheit to Celsius If Choice is 2…
Q: In this program you will ask the user for 4 integers that represent two fractions. First ask for the…
A: In this program, the user is asked for 4 integers that represent two fractions. First ask for the…
Q: You have to write a program to find the largest number and its place. For example, if the values are…
A: The following are steps needs to be taken for the given Python program: In the function, findMax()…
Q: create a Python program that simulates a race by calculating the distance Usain Bolt and a series of…
A: First of all, thanks for this fun question, the code is..... # Average speeds in miles per hour#…
Q: Write a program that prompts the user to input any digit then swap the position of the first and the…
A: Include the header file. Inside the main function take the input of the element. Take the first…
Q: Write a python program that takes two numbers (Integer) as inputs from the user. Consider the 1st…
A: Algorithm: Start Read no.of rows n, and columns m Iterate through the loop from j=1 to j=n+1(outer…
Q: Write a program that reads from the user a character ('q' or 'c'). If the character is 'c', the…
A: Note: As the programming language is not mentioned, program is written in c++ ALGORITHM Step 1:…
Q: Exercise • Write a program that asks the user -Do you want to use this program? (y/n) • If the user…
A: Code: #include <iostream> using namespace std; int main(){ string c="y"; int count=1;…
Q: Write a program that Requests a temperature from the user. Also asks if the temperature is in…
A: Ans: python is very sensitive about indentation.So, please take care about indentation.Copy the same…
Q: You can find out how many seconds have elapsed since Jan 1, 1970 using the time() function. #include…
A: Algorithm Steps:- 1. Find the number of seconds since Jan 1, 1970, using the time(NULL) function…
Q: Write a TOY machine language program which calculates x3 by using repeated addition, where x is…
A: We will write C++ code to define the toy program.
Q: Write a program which repeatedly reads numbers until the user enters "done". Once "done" is entered,…
A: As per the question statement, We will run this code and try out different input value and will…
Q: Write a program to solve the problem of Tower of Hanoi. User would input the number of plates they…
A: Given: Write a program to solve the problem of Tower of Hanoi. User would input the number of…
Q: Write a program that prompts the user for an integer and will print a multiplication table up to the…
A: #include <iostream>using namespace std; int main() { int n; cout << "Enter an integer:…
Q: The chef is a master of the number two game, and the chef wants you to play this game with him as he…
A: Input-Output Explanation: The first line of the input contains a single integer T .T denoting the…
Q: nit converter in Python that supports (length and time) and inputs the value and the initial unit…
A: We need design a simple convertor that convert the unit (length/time) as per the given description.…
Q: Write a program that creates a table for the user's choice of basic math operations (+, -, *, /, and…
A: def addition(): x = getsize() print("\n+ | ",end=' ') for i inrange(1,x+1): print(i,end=' ')…
Q: Write a program that reads from the user a character ('q' or 'c'). if the character is 'c', the…
A: Java Program for above : import java.util.Scanner; class Prog{ public static void main…
Q: Write a program that plays a reverse guessing game with the user. The user thinks of a number…
A: import util class for Random class. For generating random number use-n = rand.nextInt((high - low) +…
Q: Add a print statement to say “Multiplication Table” and then prompt the user to enter an integer.…
A: Here we need to compute the multiplication upto the number entered by user. So, this can be done…
Q: Write a program that reads from the user a character ('s' or 'a'). • If the character is 's', the…
A: As no programming language is mentioned, it is solved using basic C++
Q: Write a program that asks you to input an integer. After you input the integer, it should ask if you…
A: Please find the answer below :
Q: a program that reads from the user two integers of three digits each The program finds the sum of…
A: import java.util.Scanner;public class MyClass { public static void main(String args[]) {…
Q: Write a program that performs arithmetic division. The program will use two integers, a and b…
A: The C++ program to compute division of two variables a and b. Take input a and b from user…
Q: You need to implement the Babylonian Method for computing square roots. Based on that core…
A: C++ code for Babylonian Square root method #include <iostream>using namespace std;class…
Q: The Research team led by Bernadette Wolowitz at Cal-tech University has discovered a new Amoeba that…
A: Explanation: Include all the necessary header files. Declare the necessary variables. Take the user…
Your relative, who goes to primary school and has just learned the multiplication table, asks you to constantly ask him. You wanted to gamify it. The computer will randomly scan in the multiplication table and the user will write the answer on the screen. There will be 10 questions in total and at the end the number of questions, the number of correct answers and the number of wrong answers will be printed on the screen. Also write a
Step by step
Solved in 2 steps with 2 images
- (Program) Write a program to simulate the rolling of two dice. If the total of the two dice is 7 or 11, you win; otherwise, you lose. Embellish this program as much as you like with betting, different odds, different combinations for win or lose, stopping play when you have no money left or reach the house limit, displaying the dice, and so forth. (Hint: Calculate the dots showing on each die with theexpressiondots=(int)(6.0randomnumber+1), where random number is between 0 and 1.)Your relative, who goes to primary school and has just learned the multiplication table, asks you to constantly ask him. You wanted to gamify it. The computer will randomly scan in the multiplication table and the user will write the answer on the screen. There will be 10 questions in total and at the end the number of questions, the number of correct answers and the number of wrong answers will be printed on the screen. Also, write a program that will print if the percentage of success is below 80, it remained, and if it was above, it passed. (On C# ConsoleApp(.Net Framework)An instructor gives a series of exams during the semester in her math class. At the end of the semester she drops each student's lowest test score before averaging the scores. She has asked you to design a program that will read a student's test scores as input and calculate the average with the lowest score dropped. Here is the algorithm that you developed: Get the student's test scores. Calculate the total of the scores. Find the lowest score. Subtract the lowest score from the total. This gives the adjusted total. Divide the adjusted total by 1 less than the number of test scores. This is the adjusted average. Display the average. The test scores are in a text file named scores.txt and contains the following: Mickey, 71.0, 42.0, 83.0 Donald, 94.0, 73.0, 72.0, 81.0 Minnie, 95.0, 85.0, 45.0, 55.0, 65.0 A sample run is as follows: Enter a file containing floating point numbers: scores.txt Test scores for Mickey: ['71.0', '42.0', '83.0'] Removed the lowest score of 42.0 for Mickey The…
- In various applications, you are often asked to compute the mean and standard deviation of data. The mean is simply the average of the numbers. The standard deviation is a statistic that tells you how tightly all the various data are clustered around the mean in a set of data. For example, what is the average age of the students in a class? How close are the ages? If all the students are the same age, the deviation is 0. Write a program that prompts the user to enter any number of values into a double array, and then calculates and displays the mean and standard deviations of these numbers using the following formulas: mean)? 2i +x2 + .. + xn i=1 i=1 mean = deviation = п - 1In various applications, you are often asked to compute the mean and standard deviation of data. The mean is simply the average of the numbers. The standard deviation is a statistic that tells you how tightly all the various data are clustered around the mean in a set of data. For example, what is the average age of the students in a class? How close are the ages? If all the students are the same age, the deviation is 0. Write a program that prompts the user to enter any number of values into a double array, and then calculates and displays the mean and standard deviations of these numbers using the following formulas: (z - mean) z+z3+ *** +zn deviation = mean = n-1 Required Methods You must write your program so that the following methods are defined/implemented and used (called): • /* Compute the deviation of double values */ public static double deviation (double[] x) • /* Compute the mean of an array of double values */ public static double mean (double[] x) Sample Run (user input…write a program in python Write a program that will allow a student to enter their name and then ask them to solve 10 mathematical equations. 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. The program should then display whether their answer was right or wrong, and accumulate the right values. After the 10 questions are asked, calculate the average that was correct. Then display the student name, the number correct, and the average correct in both decimal and percentage format. In addition to any system functions you may use, you might consider the following functions: A function that allows the student to enter their name. A function that gets two random numbers, anywhere from 1 to 500. A function that displays the equation and asks the user to enter their answer. A function that checks to see if the answer is correct and accumulates the number correct. A function that calculates the…
- You have been asked to write a program to play rock-paper-scissors. Your program will ask the user to input a number 0, 1, or 2 to denote rock, paper, and scissors respectively. Your program will then randomly generate a number 0, 1, or 2 to denote the computer’s hand. The rules for the game are: •A scissor can cut paper. •A rock can knock a scissor. •A piece of paper can wrap a rock. Let the game run continuously until either the user or the computer wins 3 times, displaying the outcome of each hand. At the end of the game, display a message indicating whether the user or the computer wins Helpful Hint: import random player2= random.randint(0, 2)f. A laborant in a laboratory does a number of antigen tests in one day. Write a program that simulates the number of antigen tests done in a day in a laboratory, displays the number of positives and negatives, and calculates the % of positives in one day. Your program needs to first generate a random number that will show the number of tests done in a day. One laboratory in a day cannot do more than 100 tests and less than 1 (they do at least one). Then for each of the tests, your program needs to generate a random number to show whether they are positive or negative. In order to write this program, you need to have the following three functions used by the main function: test result (void): This function generates a test result. It should randomly return either one or zero. 1 means positive test result and 0 means negative test result. float positive percentage (int,int) : This function takes the total number of positives and the total number of tests and returns the % of positives.…. Write a program that generates and prints 50 random integers, each between 3 and 6. .Write a program that generates a random number, x, between 1 and 50, a random number y between 2 and 5, and computes x". .Write a program that generates a random number between 1 and 10 and prints your name that many times. .Write a program that generates a random decimal number between 1 and 10 with two decimal places of accuracy. Examples are 1.23, 3.45, 9.80, and 5.00.
- Airline companies apply baggage restrictions for their passengers. An airline company has decided to apply a 10kg limitation for passengers' hand luggage and 20kg for their normal baggage. When passengers arrive, they enter their hand and normal luggage weight from the keyboard. If passengers exceed their normal baggage allowance of 10 dollars per gram, they pay 12 dollars per kg. Accordingly, write the program that calculates the baggage price of the airline they will go to according to the baggage values entered by the arriving passenger and keeps this from closing the program for each passenger. Note: If hand and normal baggage allowances are stretched below the maximum value, the payment amount will be considered not negative. An example printout is given on the right. Geri bildirim gönderIn this program you will ask the user for 4 integers that represent two fractions. First ask for the numerator of the first and then the denominator. Then ask for the numerator and denominator of the second.Your program should add the two fractions and print out the result. For example, a sample program run might look like this Numerator One: 1Denominator One: 2Numerator Two: 2Denominator Two: 5The sum is 9/10 Remember, if you have two fractions you add them with: a c ad + bc __ + ___ = ______ b d bd public class AddFractions { public static void main(String[] args) { //Ask user for the 4 numbers and create necessary variables. //create your final numerator //create your final denominatorJava Program Write a program that will print the message “Computer Science is cool!!” 10 times. Use a while loop. Instead of printing 10 times, ask the user how many times the message should be printed. You will need to declare a variable to store the user’s response and use that variable to control the loop. Number each line in the output, and add a message at the end of the loop that says how many times the message was printed. So if the user enters 3, your program should print this: _____________________________________ 1 Computer Science is cool!! 2 Computer Science is cool!! 3 Computer Science is cool!! This message is printed 3 times. _____________________________________