One list of 100 numbers contains 20% ones and 80% twos. A second list of 100 numbers contains 50% threes and 50% fives. A third list is obtained by taking each number in the first list and adding the corresponding number in the second list. Note that you are not provided the order of the first and second lists.
(a) What is the average of the third list? Or is this not determined by the information given? (b) Repeat (a) with ‘adding’ replaced by subtracting.
(c) Repeat (a) with ‘adding’ replaced by multiplying by. (d) Repeat (a) with ‘adding’ replaced by dividing by.
One list of 100 numbers contains 20% ones and 80% twos. A second list of 100...
Rational Number *In Java* A rational number is one that can be expressed as the ratio of two integers, i.e., a number that can be expressed using a fraction whose numerator and denominator are integers. Examples of rational numbers are 1/2, 3/4 and 2/1. Rational numbers are thus no more than the fractions you've been familiar with since grade school. Rational numbers can be negated, inverted, added, subtracted, multiplied, and divided in the usual manner: The inverse, or reciprocal of...
The task involves writing a C++ program that determines the prime numbers between 1 and 100. The steps you should follow to identify the prime numbers are the following. 1. The number 1 is not a prime number, so it should be scratched. 2. Starting from the first prime number, which is 2, you scratch all the numbers that are the multiple of 2. You should not scratch out 2 itself. 3. The next number in the sequence after the...
Use python!!! need to match the execution result that is provided. Part One – Keyword Arguments and Default Values Write an invoice function. The function will generate a simple invoice and will have two required arguments and two keyword arguments. The two required arguments are unitPrice and quantity. The first keyword argument is shipping, and it has a default value of 10. The second keyword argument is handling, and it has a default value of 5. Test it twice from...
Use python!!! need to match the execution result that is provided. Part One – Keyword Arguments and Default Values Write an invoice function. The function will generate a simple invoice and will have two required arguments and two keyword arguments. The two required arguments are unitPrice and quantity. The first keyword argument is shipping, and it has a default value of 10. The second keyword argument is handling, and it has a default value of 5. Test it twice from...
In Python Question 3 (13 points): Purpose: To practice your ability to modify lists and compute with lists of lists Degree of Difficulty: Moderate For this question, you are given some population estimates, by age group, from Statistics Canada for some provinces. Starter File a5q3 starter.py is a file that contains a list of lists, to which the variable Pop-data refers, which represents 2020 population numbers. The first item in Pop_data is a list whose first item is the string...
[15 marks] Suppose that students enrolled in one course are required to take four tests, and each student’s final grade for this course is the average of his/her grades of these four tests. This question asks you to write a program that can be used to compute the lowest final grade, highest final grade and the average final grade. General Requirements: Use a5q1.c as the name of your C source code file. We will use the following command on bluenose...
objective question What is the mode and the mean for the following set of numbers? {4,9,8,2,16,4,4,8,9,6} O A. Mean = 7, mode =8 O B. Mean = 7, mode =4 O C. Mean = 6, mode =8 O D. Mean = 8, mode =9 You are conducting a survey of the people of the United Kingdom to find out how popular the racket sports are. You randomly choose people to call, and make 1,000 phone calls to people scattered across...
C language huffman This exercise will familiarize you with linked lists, which you will need for a subsequent programming Getting Started assignment Overview Requirements Getting Started Submit Start by getting the files. Type 264get hw13 and then cd hw13 from bash. Pre-tester You will get the following files: Q&A Updates 1. huffman.h: An empty header file, you have to define your own functions in this homework. 2. huffman.c: An empty c file, you have to define your own functions in...
Assignment 6, Merge Arrays (java) Instructions In this assignment, you will write a program which merges two arrays of positive integers and removes any duplicate entries. Your program will first ask for a valid length which must be an integer which is 10 or greater. The program should continue to ask until a valid length is entered. The program will then create two arrays of the length entered, fill these with random integers between 1 and 100 inclusive, and print...
Chose the correct answer(s) from the multiple choice lists below 1. Exergy of a system is a) b) always increasing e) guided by the first and second laws of thermodynamics for reversible processes only Un d) limited by the second law of thermodynamics for all processes. processes, it is destroyed partly or completely). e) equal to the Gibs free energy of the system. 211two electrodes, one made of u (E.-3.06 V) and another made of Cu ΟΕ.+034V placed in an...