Trace the output.
Q: etween
A: given - difference between MAXIS and DIGI based on core concept.
Q: Make sure to list at least two things about the Intel P965 Express chipset.
A: I have written few things about Intel P965 Express Chipset.
Q: Write a loop to display the powers of 2 exactly as shown below: 1 2 4 16 32 64 128
A: so, here we have to write a loop that will display the power of 2 as given above:- C++ code :- #incl...
Q: pick any 10 unsorted random numbers from the range 50-100.Apply min heapify to build heap tree struc...
A: Explanation: Include the necessary header files. Create three functions, one for creating heap, ano...
Q: V4 packet is 1000. How many b
A: The binary value of HLEN in an IPV4 packet is 1000. How many bytes of data are transported by this p...
Q: If you wanted to know the position of the letter v (i.e. return 2) in the String str containing the ...
A: A String is a pre defined class in Java which has various methods in it to perform the operations on...
Q: Question:: Regardless of how user level threads are implemented, if a programme has two or more user...
A: Introduction: Kernel: A kernel is the software or operating system at the heart of a computer. Make ...
Q: What is the output of the following code. Enter the numbers with only one space between them for(int...
A: the answer is
Q: MyProc is a procedure in an external link library. You can use the PROTO directive to name it.
A: MyProc is a procedure in an external link library.You can use the PROTO directive to name it.
Q: How will the bit representation be expanded for unsigned number (unsigned short usx to unsigned ux) ...
A: The datatypes in the domain of integer can be either signed or unsigned in nature. This nature is de...
Q: the privacy policy for Personal Operating Solutions, including how the company will share personal d...
A: Lets see the solution.
Q: Create a list of two vectors (dog, cat, mouse) and (True, True, False) called a.list. Name the vecto...
A: import numpy as np animal = np.array(["dog", "cat", "mouse"]) pet = np.array([True, True, False]) #C...
Q: A token that allows the holder to exchange the token for functionality would be considered a _____. ...
A: A token represents what a person have.
Q: Explain oops concepts..with suitable example
A: Object-oriented programming is a programming paradigm in which there is a specific way of writing co...
Q: all three of the procedures, and the total charges of the three procedures. 15. Dice Game Write a pr...
A: Solution: In this question, firstly we have to create the patient class which has fields, constructo...
Q: What will be the impact of the internet of things (IoT) on our everyday lives? Justify your position...
A: Introduction: IoT is a network of networked, internet-connected devices that can gather and transmit...
Q: Write a procedure Push (x, S) that pushes element x onto stack S, where S is one or the other of the...
A: First of all we should know why two stacks start from the opposite side.This is because so that we c...
Q: Question 1 A) Why we need Artificial Intelligence? B) Explain importance of Turing Test
A: Artificial intelligence : it is basically ability of a computer or a robotic machine to be controlle...
Q: Find the correct asymptotic complexity of an algorithm with runtime T(n) where T(x) = O(n) + T(3 * x...
A: Defined the asymptotic complexity of an algorithm with given recurrence functions
Q: Write a Java program that inputs size of array N and N numbers in the array. It should use Selection...
A: In the code, two methods are created sort() and search() for performing the selection sort and ...
Q: 8 An employee file contains records that show an employee's number, name, job code and pay code. The...
A: In the above question job code and job description is given in one table and in the other columns, t...
Q: Find the generating function for the following sequence: 0, 1,0,0, 1,0,0, 1, 0,0, 1,. You need to ex...
A:
Q: So, what precisely is the distinction between a thumb drive and a USB drive?
A: the answer is
Q: Create an e-magazine highlighting the social cause giving suggestions to address the challenge/issue...
A: For creating an e-magazine to identify the goal and then determine the unique value then make a budg...
Q: Travis works in IT and needs to connect 6 computers via LAN cables. Note that it is not necessary fo...
A: Given network contains, 6 nodes that are A, B, C, D, E and F. All the nodes are connected through ed...
Q: What are some parallels when dealing hardware interrupt and software runtime error.
A: Interrupt that is caused by software are software interrupts. Interrupt that is caused by error in h...
Q: Discuss the two most important aspects of commercialising invention. Do you agree with the arguments...
A: Introduction: Customers can acquire a broader range of items as a result of commercialization, while...
Q: Display employees (by name and address) from "Chicago" and with an annual salary between 60000 (incl...
A: The database management system is a collection of data and information and SQL languages are used fo...
Q: Which of the following determines if a Forward Error Correction (FEC) scheme has even parity? O A. T...
A: Option C i.e. The number of code bits is an even number is the correct option for Forward Error cor...
Q: Sort the following in order of asymptotic order: f1(n) = n" f2(n) = nvn f3(n) = 2" f4(n) = fa(n/2) +...
A: The increasing order of the asymptotic functions is: constant < logarithmic < root < linear...
Q: ppose that Router A and Router B are connected via a 0.05 Mbps link (note, 1 Mbps = 106 bps) and th...
A:
Q: Select a specific web application or website related to programming or designing
A: 1. Name: geeks for geeks
Q: Use following LinkedList code as a reference, add Find the average data values of the linked list. F...
A: // ----------- LinkedList.java ------------ class Node { public int item; public Node link; Node(int...
Q: can you please answer number 4 for me 1. Create a class called Student, with the following attri...
A: Class declaration is given below: public class Student{private String studentName;private int studen...
Q: Suppose the opcode of an MIPS instruction is 8 in decimal, and the rest of the machine code is 309FC...
A: INTRODUCTION: The given answer is
Q: We are a small fast-food business. Our menu features food items that can be ordered by a customer. A...
A: Introduction: Entity - An Entity is defined as any object which has real time existence. Moreover...
Q: Q4. Explain why few operating systems currently use many-to-one threading model.
A: Many of the user threads are mapped to a single kernel thread in the many to one model. Since the us...
Q: Disks and all processes share a common memory through a bus, which makes it easier for all of them t...
A: All the processes on a computer share a single memory, called the memory bus. This means that when a...
Q: Describe the TM that accepts the language, L = {w e{a,b,c}* | w contains equal number of a's, b's an...
A: Here in this question we have asked to describe a Turing machine that accept equal no of a , b ,c .
Q: Write a program to compute the combined word frequency from a given list of files.
A: Explanation: Create a file that will store the words/data. Write some data in the file. After openi...
Q: Write a program that prompts the user for a radius and then prints the diameter, circumference, and ...
A: logic:- display coloured message using color code 34 for blue. read radius from user display 2*ra...
Q: What is the maximum index of the array: int[] intArray = { 1, 2, 3, 5, 6, 7 }; Select one: O a. None...
A: int[] intArray = {1,2,3,5,6,7}: Array indexing always starting from 0 and goes till (length of arra...
Q: In the following Deterministic Finite Automaton (DFA): Sı S2 1 What statement(s) correctly describe(...
A: Because of guidelines we have to answer first three MCQ 1. False 2. True 3. False
Q: Draw the circuit and det (а) Cin (b) Parasitic delay ( (c) Logical effort (g for the following gates...
A: I uploaded handwritten solution Hope it helps u
Q: The given expression P- = Q+1 is same %3D as ans. P=P - Q + 1 P=P - Q- 1 P= -P +0 + 1
A: Option B P=P-Q-1
Q: Write python Code for classifier QM i=1 p(yi |X, α
A: SUMMARY: - Hence, we discussed all the points.
Q: If you wanted to know the position of the letter v (i.e. return 2) in the String str containing the ...
A: A String is a pre defined class in Java which has various methods in it to perform the operations on...
Q: An.dll file called kernel32.dll is what kind of file?
A: Introduction: An.dll file called kernel32.dll is what kind of file
Q: R3 fo/1 fo/0 23.23.23.2/24 f0/1 34.34.34.4/24 fo/o |12.12.12.1/24 RI fo/0 f0/0 12.12.12.2/24 f1/1 24...
A: Introduction: Applying and configuring EIGRP on R1
Q: Question:: Write a loop to display the powers of 2 exactly as shown below: 1 2 4 16 32 64 128
A: According to the information given:- We have to write code to display power of 2 as output mentioned
Step by step
Solved in 2 steps
- Computer Science Title: Programming - Practical Test 1 - SET 3Learning Objective:Write simple Java programs using basic data types, operators and expressions.Write Java programs using control structures - Sequence Question:Prepare a program that can read the price (RM) of two books. Calculate and print the total price (RM) of the two books that includes 5% discount.. Based on the given problem, the student need to:i. Write the Java programii. Display the output[100% marks] Sample input and output:Input price of book 1 : 50.50Input price of book 2 : 90.90Total price : 141.4Discount : 7.07Net paymant : 134.33 help me please asap.(Statistics) This is the formula for the standard normal deviate, z, used in statistical applications: z=(X)/ X is a single value. refers to an average value. refers to a standard deviation. Using this formula, you need to write a program that calculates and displays the value of the standard normal deviate when X=85.3,=80,and=4. a. For this programming problem, how many outputs are required? b. How many inputs does this problem have? c. Determine a formula for converting input items into output items. d. Test the formula written for Exercise 7c, using the data given in the problem.SYNTAX ERROR HELP - PYTHON This also happens for several other 'return result' lines in the code. import randomdef rollDice(): num1 = random.randint(1, 6) num2 = random.randint(1, 6) return num1, num2def determine_win_or_lose(num1, num2): result = -1 total = num1 + num2print(f"You rolled {num1} + {num2} = {total}")if total == 2 or total == 3 or total == 12: result = 0elif total == 7 or total == 11: result = 1else: print(f"point is {total}") x = determinePointValueResult(total)if x == 1: result = 1else: result = 0 return resultdef determinePointValueResult(pointValue): total = 0 result = -1while total != 7 and total != pointValue: num1, num2 = rollDice() total = num1 + num2if total == pointValue: result = 1elif total == 7: result = 0print(f"You rolled {num1} + {num2} = {total}")return resultwhile i < n: num1, num2 = rollDice() result = determine_win_or_lose(num1, num2)if result == 1: winCounter += 1 print("You…
- Statistics are often calculated with varying amounts of input data. Write a program that takes any number of non-negative integers as input, and outputs the average and max. A negative integer ends the input and is not included in the statistics. Ex: When the input is: 15 20 0 5 -1 the output is: 10 20 You can assume that at least one non-negative integer is input. This is the code I am using: import java.util.Scanner; public class LabProgram {public static void main(String[] args) {Scanner input = new Scanner(System.in);int[] a= new int[100];int i=0, sum=0;double avg, max=0;while(true){a[i]=input.nextInt();if(a[i]<0)break;elsesum=sum+a[i]; // sum the numbersi++;}avg=(double)sum/i; //compute averagefor(int j=0; j<i;j++)if(max<a[j])max=a[j];System.out.printf("%.2f %.2f\n", avg,max); // print result}} These are the outputs I am getting and I cannot figure out how to remove the decimal. Input 15 20 0 5 -1 Your output 10.00 20.00 Expected output 10 20 Input 2 2 2…Statistics are often calculated with varying amounts of input data. Write a program that takes any number of non-negative integers as input, and outputs the average and max. A negative integer ends the input and is not included in the statistics. Ex: When the input is: 15 20 0 5 -1 the output is: 10 20 You can assume that at least one non-negative integer is input. import java.util.Scanner; public class LabProgram {public static void main(String[] args) {Scanner scnr = new Scanner(System.in);int numValue;int average;int max;int numValues;int numTotal;numTotal = 0;numValues = 0;max = 0;numValue = scnr.nextInt();while (numValue > 0){numTotal = numTotal + numValue;numValues = numValues + 1;numValue = scnr.nextInt();}average = numTotal / numValues;System.out.print(average);while (numValues > max){max = numValues;System.out.print(" " + max);} }} Why is it giving me the wrong output??Statistics are often calculated with varying amounts of input data. Write a program that takes any number of integers as input, and outputs the average and max. Ex: If the input is: 15 20 0 5 the output is: 10 20 My code: data = input("")count = 0total = 0max = -99999 for val in data:total += int(val)count += 1if int(val) > max:max = int(val)avg = total/count print(avg)print(max) *When this code did produce an output average was output as 17.5 and not 10. I made adjustments to try to get 10 and now I am getting errors.
- 4. (Looping statement) java Given an integer, display its reversed order. Sample Output: Enter n : 876 The reversed order of 876 is 678.4.31 LAB: Months until payoff (JAVA) Write a program in java that reads a loan amount, payment amount, and interest rate as inputs and outputs the number of payments required until the loan is paid. Interest is added to current balance before a payment is applied. Ex: If current balance is $100.00 and the interest rate is 0.02, the new balance is $102.00 before a payment is applied. All values are doubles. import java.util.Scanner; public class LabProgram { public static void main(String[] args) { Scanner scnr = new Scanner(System.in); /* Type your code here. */ }}Calculator Challange Python Coding Create a simple calculator that takes in TWO numbers from the user and then asks the user to select if they want to ADD, SUBTRACT, MULTIPLY or DIVIDE to get the answer. I have coded... print("input whole numbers please, no decimals")again=""while again!="N":first=int(input("What is the first number?"))last=int(input("What is the last number?"))#let user pick the operation, assign numbers to the operationsoperation=int(input("Would you like to 1) add, 2)subtract, 3)multiply, or 4) divide?"))if operation==1:answer=first+lastelif operation==2:answer=first-lastelif operation ==3:answer=first*lastelif operation == 4:answer=first/lastelse:print("You did something wrong, try again.")print("The answer: %s"%(answer))again=str(input("Would you like to go again? Y/N")).upper()same=str(input("Would you like to use the same two numbers? Y/N")).upper()while same=="Y":operation = int(input("Would you like to 1) add, 2)subtract, 3)multiply, or 4) divide?"))if…
- Instructions Complete the lab using “for loop”. Do not write the code in multiple programs. All the 3 methods should be written in 1 program. Write a java program calls the following methods: printStars(): Takes an int (n) as parameter and prints n stars (*) using for loop. Multiples(): Takes an int (n) as parameter and prints first 10 multiples n in a single line using for loop. hasAnEvenDigit: Takes an int (n) as parameter and returns whether n has at least one digit whose value is even. Return true if the number has at least one even digit else false if none of the digits are even. For example, the call hasAnEvenDigit(33267) should return true and hasAnEvenDigit(7591) should return false. [Hint: n%10 returns the last digit and n/10 returns everything except the last digit]USING FOR LOOP1. Create a program that can print 1to 50 .2. Create a program that can print 50-13. Print your name 10 times4. Print the output using for loop: 2 4 6 8 10 12 14 16 18 205. Print the output using for loop: 3 6 9 12 15 18 21 -USED JAVA PROGRAMMING LANGUAGEPet World offers a 15 percent discount to senior citizens . Write a pseudocodealgorithm for a program that inputs the amount of a sale, then calculates anddisplays both the amount the customer saves and the amount they must pay .