Four exercises, each worth 20 points. For each exercise, the programming file in java format (there are 2 files in total: variance, twin primes) 1) Calculate the variance, to 2 decimal places, for a sample of n values (yes, you have to ask how many values there are) using the following formula (if you use another formula, your program is wrong). This program must implement the formula using a for loop, one only. Print on paper the run for the following 7 values: 7.3, 2.1, 4, 4, 5.9, 6 and 2.6 £7x² - E*x)* n- 1 £7 x² – 2) Modify the prime number program so that it lists the twin prime numbers less than or equal to 200. In number theory, two prime numbers (p, a) are twin prime numbers if they are separated by a distance of 2 that is, If a=p•2. For example: (3, 5), (5, 7), (11, 13), (17, 19), (29, 31), (41, 43), (59, 61), (71, 73), (101, 103), - Print the run for twin primes less than or equal to 200.
Q: ust not be copy. These are wrong code with explanation I need. I did not understand logic and all I...
A: As given in the problem statement here we use list comprehension which uses only two lines of code f...
Q: Explain Malicious Software, Viruses, Worms, Malwares, and Denial of Service (DoS) using a real-world...
A: Explain Malicious Software, Viruses, Worms, Malwares, and Denial of Service (DoS) using a real-world...
Q: A program is required by a corporation in order to read an employee's identification number, pay rat...
A: Find the required code in python as language not mentioned given as below and output:
Q: We have a house with 3 rooms. We need the user to enter 1 integer as the window number, 2 doubles as...
A: code : #include <iostream> #include <fstream> using namespace std; // The House class ...
Q: Viewing HTML in web development software is called____. Group of answer choices Code View D...
A: Given :- Viewing HTML in web development software is called____. Group of answer choices Code Vi...
Q: What are your thoughts on Cybersecurity and Infrastructure Security Agency Act? Cite a source to sup...
A: Cybersecurity and Infrastructure Security Agency Act is also known the short name of CISA Act.
Q: Today's information arrives in a variety of formats. Explain such kinds using instances from the con...
A: Introduction: A computer network, also known as a data network, is a communication system that allow...
Q: You need to design and write a Python application. You need to generate an array A that has numbers...
A: The code is given in the below step by step
Q: 5.25 Consider the Nim game: There are n number of tokens. Each player is required to divide the pile...
A: Below is the correct answer to above query. I hope this will meet your requirements...
Q: Give an example of OOP and describe its properties.
A: Object-Oriented-programming (OOP) is a programming worldview that depends on the idea of classes and...
Q: Find the product of 34 and 27 using the following methods. Illustrate/write your complete solution 3...
A:
Q: for this problem I ju
A: The code for the given function is given below.
Q: oday, thanks to the technological progress, the vast majority of appliances are equipped with wirele...
A: INTRODUCTION: Wireless equipment and services have a major influence on the way businesses operate....
Q: Choose a number and apply the following operations to it. Divide the number by 2, and add 3 from the...
A: Inductive Reasoning is the method in which we assume some particular number and then derive the rela...
Q: What exactly is data visualisation?
A: Introduction: Data visualisation is a graphical representation of data and information.
Q: x29, 12(x16) x29, 8(x16) х17, х15, х14 x17, label х15, х11, х14 ub zba d ub ddi d х15, х30, х14 х2, ...
A: Lets see the solution.
Q: Highlight some of the ways that can be used to make sure that deadlocks can be recovered.
A: Required - Deadlock Detection and RestorationIf Deadlock Detection Algorithm determines that deadloc...
Q: What is the difference between Hadoop and Apache Spark?
A: Introduction: Hadoop is an open source system for storing and analysing huge volumes of data across ...
Q: Is it usual or unusual for TCP SYN and ACK segment to carry data during the three-way handshake conn...
A: answer is
Q: subnet numbers for the new LAN. You’ve determined that you need 3 subnets for the Class C network be...
A: Solution:-
Q: Choose the letter o
A: given - Which of the following statements apply to resume design? * Use as many fonts, font sizes, a...
Q: 18. In the program of Fig. 2.9, what is the advantage of writing (on line 107) MAXLEN EQU BUFEND-BUF...
A: Expressions:- Absolute expressions and relative expressions are two types of expressions relative e...
Q: create a TimeLine animation that shows a line with one end at the centre of a 300 * 300 stage and th...
A: protected void updateCSS() { final long now = System.nanoTime(); final double diffMillisSinceL...
Q: What are Hadoop's Edge Nodes?
A: Hadoop's Edge Nodes Hadoop edge nodes are the computer that provide the interface between Hadoop cl...
Q: Is it possible to utilize Boolean methods to modularize input validation? What is the reason for thi...
A: Introduction: At work, we often employ functions that return a BOOLEAN, where the BOOLEAN reflects a...
Q: Find a zero for the following function using the a hybrid metod. Start with Bisection for 3 iteratio...
A: Task : Given the function. The task is to implement the bisection and newtons method to find the ro...
Q: Implementing AES Implement (almost) the first round of AES with a 128-bit key. Given a 128-bit plain...
A: Steps for the AES Encryption Process The encryption process uses a set of specially designed keys c...
Q: 3. Old McDonald has a farm with 30 chickens. The chickens comprise 40% of his farm, and the rest of ...
A: Actually, given information Old McDonald has a farm with 30 chickens. The chickens compromise 40% of...
Q: en show the
A: Height of a node in a heap is the number of edges on the longest simple downward path from the node ...
Q: describe the cache protocol
A: Cache protocol is explained below :
Q: Using java: Input the row number and display the sum of all numbers in that row. 2 6 8 12 32 54 8 5 ...
A: The first row is indexed by 0 and thus if we input row number n, then we will calculate the sum of e...
Q: Write a program to compute Letter grades for a course. The course records are in a file that will se...
A: Step 1 : Start Step 2 : Take user input for the grading system for the Scores of the students. Step ...
Q: Differentiate between the procedural programming and the Object-Oriented programming.
A: NOTE: If there are multiple questions available then we are allowed to solve first question only 1) ...
Q: roblem I just want t
A: For the given function, the corrected code is explained below.
Q: Could you perhaps explain what the term "Firewall vulnerability exploit" means?
A: Given: explain what the term "Firewall vulnerability exploit" means?
Q: C++ PROGRAMMING EXERCISE Given an array of integers below, write a program to reverse all the elemen...
A: while (number != 0) { remainder = number % 10; // Getting the last number ...
Q: Question 2 Use the encoding formula y =x + 18 (mod 26). (TYPE WITH NO SPACES) 1. Encode: DWN 2. The ...
A: Given : Encoding formula : y = x + 18 (mod 26) Alphabet A = 0, B = 1, C = 2 ........... Z = 25 See ...
Q: Create an appropriate Java Postfix calculator class using th ealgorithm below. Your program should a...
A: program of the given code is: public class Postfix { public static void main(String[] args) { i...
Q: A port scanner may be used by an attacker to detect potential flaws in a potential victim's device. ...
A: Port Scanner: A virtual location where networking contact takes place is referred to as a terminal....
Q: Give state diagrams of DFAS recognizing the following languages. In all parts the alphabet is {0,1} ...
A: No of states in this DFA: n + 1 => 3 + 1=> 4
Q: ntrol'
A: Introduction: The pictures will seem distorted if the Image Size property value does not match the s...
Q: Which industry do you want to use data mining in?
A: Introduction: Data mining techniques are used in a variety of domains, including mobile service prov...
Q: How Linux could be used in any part of rocket technology, or how it could.
A: Given: How Linux could be used in any part of rocket technology, or how it could?
Q: Collaboration creates in our
A: The value that Innovation & Collaboration creates in our current and future IT and Computer sy...
Q: Question 1 Simplify 22 O4 3 4 % = (mod 4) %3D
A: Find the answer with calculation given as below :
Q: What is the name of the modulation technique that is utilized by twisted pair cable computer network...
A: To find type of modulation technique used by twisted pair cable computer networks?
Q: perations.
A: given - 1. Write a Program for Circular Linked List for this operations. To insert a node at head l...
Q: "); YourNames.add("Huda"); YourNames.add("Seham"); YourNames.add("Yusra"); YourNames.add("Mohammed "...
A: 1. Write a Java Program to arrange the following names in Ascending order using Heap Sort algorithm ...
Q: Write a C function that would compute for the power given the base and the exponent. Take into consi...
A: Your C program is given below as you required with an output .
Q: Implement the following expression in assembly language: ...
A: START val1 1234h val2 0010h val3 0100h val4 0011h EDX TEMP MOV EDX, val3
Step by step
Solved in 8 steps with 6 images
- Use Python & Don't use any python Library. You can use Random.randint() only. 3. Suppose you have been hired to develop a musical chair game. In this game there will be 7 participants and all of them will be moving clockwise around a set of 7 chairs organized in a circular manner while music will be played in the background. You will control the music using random numbers between 0-3.lf the generated random number is 1, you will stop the music and if the number of participants who are still in the game is n, the participants at position (n/2) will be eliminated. Each time a participant is eliminated, a chair will be removed and you have to print the player names who are still in the game. The game will end when there will be only one participant left. At the end of the game, display the name of the winner. [Hint: You will need to invoke a built-in method to generate a random number between 0 (inclusive) to 3 (inclusive)]Implement using python progeam 1) The Variables used here are as followes B : True if there is a Baseball Game on TV, False if not G: True if George watches TV, False if not C: True if George is out of Cat Food, False if not F: True if George feeds his cat, False if not. Let us say you are given some Training Data which represents what happens over a period of time (For example: This file contains what happens every evening over one specific year). Your Task is to learn the conditonal probabilty tables for the bayesian network from the training data. The training data will be formatted as follows: The first number is 0 if there is no baseball game on TV (B is false), and 1 if there is a baseball game on TV (B is true). The second number is 0 if George does not watch TV (G is false), and 1 if George watches TV (G is true). The third number is 0 if George is not out of cat food (C is false), and 1 if George is out of cat food (C is true). The fourth number is 0 if George does not feed…Write a program that loads in historical data on popular baby-names for the last 100 years. You can type in a name, and it graphs the rank of that name over time. A high ranking, like 5, means the name was the 5th most popular that year (top of the graph), while a low ranking like 879 means the name was not that popular (bottom of the graph). Write it in python the latest version The first function you will write and test is the clean_data function. The function is described in the starter code in a function header comment above the function. Here is the function: def clean_data(list, x): #TODO: write your code here pass Take a look at the first few lines of the data file: A 83 140 228 286 426 612 486 577 836 0 0 Aaliyah 0 0 0 0 0 0 0 0 0 380 215 Aaron 193 208 218 274 279 232 132 36 32 31 41 Each line is a baby name followed by how popular the name was in 11 different years. Each number is a ranking, so Aaron was 193th most popular name in 1900 and 41st most…
- Write a program that loads in historical data on popular baby-names for the last 100 years. You can type in a name, and it graphs the rank of that name over time. A high ranking, like 5, means the name was the 5th most popular that year (top of the graph), while a low ranking like 879 means the name was not that popular (bottom of the graph). Write it in python the latest version The first function you will write and test is the clean_data function. The function is described in the starter code in a function header comment above the function. Here is the function: def clean_data(list, x): #TODO: write your code here pass Take a look at the first few lines of the data file: A 83 140 228 286 426 612 486 577 836 0 0 Aaliyah 0 0 0 0 0 0 0 0 0 380 215 Aaron 193 208 218 274 279 232 132 36 32 31 41 Each line is a baby name followed by how popular the name was in 11 different years. Each number is a ranking, so Aaron was 193th most popular name in 1900 and 41st most popular name in…Write a program that loads in historical data on popular baby-names for the last 100 years. You can type in a name, and it graphs the rank of that name over time. A high ranking, like 5, means the name was the 5th most popular that year (top of the graph), while a low ranking like 879 means the name was not that popular (bottom of the graph). Write it in python the latest version The first function you will write and test is the clean_data function. The function is described in the starter code in a function header comment above the function. Here is the function: def clean_data(list, x): #TODO: write your code here pass Take a look at the first few lines of the data file: A 83 140 228 286 426 612 486 577 836 0 0 Aaliyah 0 0 0 0 0 0 0 0 0 380 215 Aaron 193 208 218 274 279 232 132 36 32 31 41 Each line is a baby name followed by how popular the name was in 11 different years. Each number is a ranking, so Aaron was 193th most popular name in 1900 and 41st most…I need the code from start to end with no errors and the explanation for the code ObjectivesJava refresher (including file I/O)Use recursionDescriptionFor this project, you get to write a maze solver. A maze is a two dimensional array of chars. Walls are represented as '#'s and ' ' are empty squares. The maze entrance is always in the first row, second column (and will always be an empty square). There will be zero or more exits along the outside perimeter. To be considered an exit, it must be reachable from the entrance. The entrance is not an exit.Here are some example mazes:mazeA7 9# # ###### # # ## # # #### # ## ##### ## ########## RequirementsWrite a MazeSolver class in Java. This program needs to prompt the user for a maze filename and then explore the maze. Display how many exits were found and the positions (not indices) of the valid exits. Your program can display the valid exits found in any order. See the examples below for exact output requirements. Also, record…
- In this exercise, we will write a program to find the sum of all numbers between any two seeded randomly generated numbers, inclusively, where the randomly generated numbers are also included in the sum. For example, if the randomly generated integers are 15 and 25, you need to sum all odd numbers from 15 to 25, and 15 and 25 are also included in the sum. Note that the random number generated may be even, so you should NOT include that number in your sum. In this program, you will: • Generate the first random integer between 10 and 30, inclusive. • Generate a second random integer between 40 and 60, inclusive. • Inside a while loop, accumulate the sum of all numbers between the two random numbers generated, being sure to include the two random numbers in the sum. • Display the two random numbers as well as the sum on the screen with suitable messages. Using C++ languageIn this exercise, we will write a program to find the sum of all numbers between any two seeded randomly generated numbers, inclusively, where the randomly generated numbers are also included in the sum. For example, if the randomly generated integers are 15 and 25, you need to sum all odd numbers from 15 to 25, and 15 and 25 are also included in the sum. Note that the random number generated may be even, so you should NOT include that number in your sum. In this program, you will: • Generate the first random integer between 10 and 30, inclusive. • Generate a second random integer between 40 and 60, inclusive. • Inside a while loop, accumulate the sum of all numbers between the two random numbers generated, being sure to include the two random numbers in the sum. • Display the two random numbers as well as the sum on the screen with suitable messages.One way to put a list of people into teams is by counting off. For example, if the list of people is: ['paul', 'francois', 'andrew', 'sue', 'steve', 'arnold', 'tom', 'danny', 'nick', 'anna', 'dan', 'diane', 'michelle', 'jeremy', 'karen'] and the number of teams desired is four, then you assign the people to teams 0, 1, 2, 3, 0, 1, 2, 3, etc. like this: [['paul', 'steve', 'nick', 'michelle'], ['francois', 'arnold', 'anna', 'jeremy'], ['andrew', 'tom', 'dan', 'karen'], ['sue', 'danny', 'diane']] Write the code for the following function. Do not assume that the list of people will divide evenly into the desired number of teams. If the list of people does not divide evenly into the desired number of teams, the teams will simply have unequal sizes. Do not assume that the number of people is at least as large as the number of teams. If there aren't enough people to cover the teams, some (or even all) teams will simply be empty. Hint: The range function will be very helpful. def form_teams…
- Transcribed Image Text Python Development Lab In Merworld there exists 2 coins of different denominations types 5-peso coins and 10- peso coins, both having two faces with image of – Elon Musk and a dog. You are assigned a task to find out the number of ways to arrange these coins so that their sum is N pesos. Arrangement should be done in such a way that the first coin in the arrangement should always have Elon Musk image up. Other coins could have any image. Input Output 1 60 5 LOUsing Matlab. Monte Carlo methods are a class of computational methods that rely on repeated random sampling to compute their results. In this problem, you will use the Monte Carlo method to estimate the temperature at an arbitrary point in a uniform solid. Specifically, we will consider the solid object shown below. The temperatures of all surfaces are 500 des F with the exception of the two shaded surfaces, which are at 0 deg F. Inputs to the program should be: 1. The number of random walkers. 2. The (x,,2) coordinates of the point at which the temperature is to be estimated. 3. Plot interval (eg., you may want 1,000,000 random walkers in the simulation but may want to plot after every 10,000). Output from the program should be: 1. A graph of the estimated temperature, plotted according to the plot interval 2. Numerical value of the estimated temperature. USING MATLABGenerating statistics from a set of data is a task that computers love. In this assignment, you will be implementing a grade processing system that will generate the mean and standard deviation for a set of final exam grades. We will assume that final grades are stored in a list, where each entry in the list is a string with the following format: "studentNum-finalGrade%" The string represents the final exam mark (finalGrade) that the student (studentNum) achieved. For example, the cell below contains a list of final exam marks from two students. Student 1007089 achieved a mark of 91%, and student 1009989 achieved a mark of 77.5%. grades = ['1007089-91%','1009989-77.5%' ] We want to calculate the mean final exam mark from a list of grades. If we assume that we have N grades, the mean x can be calculated from the following formula: N-1 1 (1) i=0 The variable x; represents each grade in our list at index i. We assume that we start counting at 0. We also want to be able to calculate the…