a = randi(250,12,2) pr = 0; bonus 10000; for k = 1:numel(a) pr = pr + a(k); end disp(['total hours of job done by you in a year are: ',num2str(pr)]) if pr >= 2800 disp(['Great...you earned a bonus amount of Rs. ',num2str(bonus)]) else disp(['better luck next year....']) end
Q: required in C-programming sir! Suppose the university has decided to announce bonus 1 PMS point to…
A: Here we have to choose Structure datatype for defining UID, Employee Name and PMS Status. The…
Q: API=(141.5/(SG))-131.5 SG=(141.5/(API+131.5)) The Characterization factor(Kw) for crude oil is…
A: Given data: SG=(141.5/(API+131.5)) Kw=(∛TB)/SG where; TB=mean aberage boiling point, deg Rankine SG…
Q: 3. A safe is locked by a combination of of four binary digits (that is, 0 or 1), but the owner has…
A: Answer 3. a)
Q: 1. Generic code for N number of Employees (bor 2. Marks Distribution of the functions.
A: Solution:-- 1)As the given question is expecting the solution to be provided in the programming…
Q: Complete the program 'Bcast-Reduce-Assignment.c' (Refer to 'Bcast-Reduce-Example.c') to make the…
A: void MPI_Bcast(void* data, int count, MPI_Datatype datatype, int root, MPI_Comm…
Q: Ilinclude using namespace std; string USERNAME [ 20] -{"Rey", "Jasper", "Paula"}; string PASSWORD[…
A: An algorithm is an informal description of the steps used to solve a specific problem. It is a…
Q: The card game “War” is played by the following rules (you may have learned different rules. Use…
A: def review_to_words( raw_review ): # Function to convert a raw review to a string of words #…
Q: tenuse (a, b) sqrt (a*a + b*
A: Solution - In the given question, we have to find the correct answer among the given options.
Q: This question involves the implementation of the MultipleGenerator class which generates a random…
A: I give the code in java along with code screenshot and output screenshot
Q: Based on the above program, create a function void priorityQueue (queue q), whi accept current queue…
A: Answer:
Q: fill in the blank int x = 20 ; char buf [ 10 ] ; ssprinf ( ________ , "%d", _______ ) ;…
A: Given: Fill in blanks
Q: I have problem in java 2 code: lease.setApartmentNumber(sc.nextLine()); melt:String cannot be…
A: Scanner class is used to accept input from user nextLine() will return the input in string format…
Q: Draw Flowchart of this program // C# program for implementation // of Lagrange's Interpolation…
A: Here is the flowchart the of above code. See below step for flowchart.
Q: Content Section 5.15-CYB/135: Object-CX zy Section 4.11- CYB/135: Object-C x Xx A…
A: Given:
Q: Question Completion Status: 1 4 100 12 130 11 14 15 16 170 18 19 20 21 22 23 24 25 26р T pom JUYC…
A: To compute the minimum number of students in a section that holds the maximum number of students, we…
Q: The farmer has counted his animals and he gives you a subtotal for each species. You have to…
A: In this problem, we need to design the PHP Code. Input - 3 argument to function. a number of…
Q: n C++, using STL algorithms, containers, or iterators, use the text file shoes.txt, where you want…
A: code #include<bits/stdc++.h> using namespace std; int main(){ string shoes; char…
Q: 3. A safe is locked by a combination of of four binary digits (that is, 0 or 1), but the owner has…
A: Answer (a).
Q: Create valid names for functions that do the following for example:saletax() Find the density of a…
A: Answer: steelDoorDensity() maxValue() sortLowestToHighest()
Q: uppose, you are working in a company ‘X’ where your job is to calculate the profit based on their…
A: Note:- I am taking the Python part. Program: class FinalQ: def print(self,array,idx):…
Q: Programming Language: C++ Develop a Tic Tac Toe game that will match a player against the computer.…
A: #include<bits/stdc++.h> using namespace std; #define COMPUTER 1 #define HUMAN 2 #define…
Q: s of enrolment number - 308 Let a, b and c denote the last three digits of your enrolment number…
A:
Q: Consider the following statements: T(x, y): "x eats y". A(x). "x is wise". S(x): "x is hungry".…
A: option 3
Q: C++ Program Code: Dreamworld is known for his uniqueness and there are 2 different denomination…
A: Please find the code below:
Q: Create an iterator that returns numbers, starting with 1, and each sequence will increase by one…
A: Solution in C++- #include <iostream>using namespace std;void interater(){ for (int i =1;…
Q: #in c++ We need to store information about each student in a class of N students. For example, name,…
A: PROGRAM EXPLANATION: The algorithm for creating the program with given description is as follows:…
Q: Consider the following statements: T(x, y): "x eats y". A(x): "x is wise". S(x): "x is hungry".…
A: Answer: C
Q: 3. A safe is locked by a combination of of four binary digits (that is, 0 or 1), but the owner has…
A: Answer is below:
Q: Write a complete C program that analyse the statistics of 5 YouTubers' debut video. The program…
A: Here I have first of all asked the user to enter the number of views for each of the 5 YouTubers Now…
Q: This challenge is based on the classic videogame "Snake". Assume the game screen is an n * n square,…
A: Program Plan: The following code is written in Python language. Define a Python function, snakefill…
Q: Given the following source code: double ComputeSum1(int numIterations) { int i; double sum = 0.0;…
A: Loop unrolling is a code optimization technique that avoids tests at every iteration of the loop.…
Q: C++ Create a Blackjack (21) game. Your version of the game will imagine only a SINGLE suit of…
A: Answer :
Q: uppose we are developing a program that a car dealership can use to manage its inventory of used…
A: Below is the required java program. Program Approach: Create a class as Automobile. Inside an…
Q: Write a complete C program that analyse the statistics of 5 YouTubers' debut video. The program…
A: Code snippet and sample output:
Q: This challenge is based on the classic videogame "Snake". Assume the game screen is an n *n square,…
A: In this problem, we need to design the code in the Python programming language. Input - Integer…
Q: Java Program create a prog that will compute the final grade for a certain student and will display…
A: PROGRAM EXPLANATION: Import java.util package. Create the main class. Create the main method.…
Q: Consider the following statements: T(x. y): "x eats y". A(x): "x is wise". S(x): "x is hungry".…
A: The symbolic for the given sentence is as follows.
Q: the sum of each pair's values is exactly equal to the target sales. Input The input to the…
A: Java code :- import java.util.*;public class Solution { public int pairs(int n,int[] arr,int…
Q: C++ Program Code: Dreamworld is known for his uniqueness and there are 2 different denomination…
A: Algorithm - Firstly take the input from the user. Take the input for the use-case input. Now…
Q: In a game of tic-tac-toe, two players take turnsmarking an available cell in a 3 x 3 grid with their…
A: In a game of tic-tac-toe, two players take turnsmarking an available cell in a 3 x 3 grid with their…
Q: For the following main function int _tmain(int argc, _TCHAR* argv[]) { int…
A: Here main program is given n function has to write according to the output given In output the…
Q: A word is on the loose and now has tried to hide amongst a crowd of tall letters! Help write a…
A: In order to implement the function, the crowded word with extra letters is sent to the function as…
Q: When stocks are sold or purchased through a broker, the broker's commission often depends upon the…
A: In this code, we need to add the case statement to identify and execute the correct statement to…
Q: This challenge is based on the classic videogame "Snake". Assume the game screen is an n * n square,…
A: In this question we need to write a program to calculate how many times a snake can eat before…
Q: Ensure that the input values representing fractions are stored with denominators that are positive…
A: Given: Ensure that the input values representing fractions are stored with denominators that are…
Q: lated al pitages. play SATURATED (greater than 5V) and CUTOFF (less than 5V). Use the UML diagram as…
A: VoltTester.java: class Testers{int voltArray[]= new int[10];int voltActive;int voltSaturted;int…
Q: Computer Science Practice Task : Write a program in phyton language . Implement Water Jug…
A: Algotithm You are given a m liter jug and a n liter jug. Both the jugs are initially empty. The jugs…
Q: Write a program which prompts the user for the values of the individual fields within a struct…
A: Program #include <iostream>using namespace std;struct employee { char name[50]; int age;//…
Q: Ô https://learn.zybooks.com/zybook/SNHUIT140V3/chapter/5/section/7 My library > IT 140: Introduction…
A: Input : User Ounces Output : Compute the Popcorn time and print it.
Q: This challenge is based on the classic videogame "Snake". Assume the game screen is an n * n square,…
A: As the programming language is not mentioned here, we are using PYTHON The Python code is given…
fix the bug in matlab code and give the output
Step by step
Solved in 2 steps with 1 images
- int goo bam 12, hah 6, еek; double meh; eek goo + bam % hah; meh = eek * goo + hah / 4 * 3; What are the values of eek and meh?Condition ;;; 2. Cond (condition) function (defparameter *age* 18); Create variable age (defvar *college-ready* nil) ;;; cond is like if else if else (cond ((>= *age* 18); If True do this (setf *college-ready* 'yes) (format t "Ready for College ~%")) ((< *age* 18); Else If T do this (setf *college-ready* 'no) (format t "Not Ready for College ~%")) Task: Modify the above to read the age from the terminal/console and run it with age 17 and 19. e,g, What is the age? 19 Ready for CollegeJSON Response example when code = BAHRAIN as follows: { "Country": "Bahrain", "Tenps"il ("day": "SUNDAY", "temp"i {"day": "HONDAY", "temp": 35), ("day": "TUESDAYr, "teng": 39), ("day": "WEDNESDAY", "tenp": 37),. ("day"i "THURSDAY", "tenp": 35), ("day"i "FRIDAV", "temp": 34), ("day": "SATURDAY", "teng": 37) 1. Implement find Templ ) function as follows: Sample Eample This function will be called whenever the user change the value of the pull-down menu. This function should contact Ve the Web Service API, sending the selected country code, to Co display the information (country, daily temperatures in the week and average weekly temperature) inside the div tag whose id -result as shown in the example on the right. Country ahraln In addition, the country name and the average temperatures should be saved as one JS object inside an array in a local storage. Whenever new request is made, the countrylaverage will be saved and added to the array inside the local storage (duplicates is allowed).…
- assign(self, assignment:Assignment) -> AssignmentResult: """ This function is to simulate the process of the student receiving an assignment, then working on the assignment, then submitting the assignment and finally receiving grade for the assignment. This function will receive an assignment then a grade should be calculated using the following formula: grade = 1 - (Student's current energy X Assignment difficulty level). The min grade a student may receive is 0% (0) After the grade is calculated the student's energy should be decreased by percentage difficulty. Example if the student has 80% (.8) energy and the assignment is a difficultly level .2 there final energy should be 64% (.64) = .8 - (.8 * .2). The min energy a student may have is 0% (0) Finally the grade calculated should be stored internally with in this class so it can be retrieved later. Then an Assignment Result object should be created with the student's ID, the assignment…13. Factorial Implementation What is incorrect with the following implementation of factorial: def factorial(n): return n* factorial(n-1) Pick ONE option Nothing is wrong The return value should be n+ factorial(n-1) The return value should be factorial(n-1) * factorial(n-2) ) A base case is missing Clear Selection loxituL et D= { s, d, b}, E= { c, k}, G= { a, k }, U={a, b, c, d, k, s} DUE=
- last 3 digits of enrolment number - 308 Let a, b and c denote the last three digits of your enrolment number (so for example with enrolment number 001054321, you would take a = 3, b = 2 and c = 1) and then take each of them (mod 2). So in the example above, a, b and c would become 1, 0, 1 respectively (each digit taken (mod 2)). Consider the polynomial . (a) Create a polynomial code of codeword length 8 from this generating polynomial. (b) Is your code cyclic? Justify your answer.QUESTION 21 int x1=200; int y1=3003; int z1, z2, z3, z4; int d1, d2, d3; _asm{ mov EAX, x1; 200 mov EBX, y1; 300 mov z1, ESP; assume initial ESP: OFFF FFEA add EAX, x1; 400 push EAX; mov d1, EAX:400 mov z2, ESP; push EBX; SUB EBX, x1; 300-200=100 mov d2, EBX; mov 23, ESP; POP ECX; MOV d3, ECX; MOV z4, ESP; POP EDX; mov d4, EDX; What is z3 in Hexidecimal? O OFFF FFEA O OFFF FFE6 OFFF FFE2 OFFF FFEEQ1: Research Groups In response to popular demand, Dan’s established two research groups A and B composed of his n graduate students. Each of these students is a member of exactly one of the two groups at any given time. The students are numbered from 1 to n in some arbitrary order. To measure the success of his research groups, Dan assigns a citation score to each of them. Initially, both groups have citation score 0. Throughout the semester, events of the following two types happen: Student x publishes a paper in which they cite student y’s work (youcan assume all of the students have been around long enough to have prior research that can be cited). As a result, If x and y are in the same group, their group’s citation score increases by 1. If x and y are in different groups, y’s group’s citation score increases by 5. Dan changes student x’s group (from A to B or from B to A) to have them work on different projects. To assess the overall success of the research groups, Dan…
- def main(): monthlySales = getSales() printbonus=print_bonus(storeAmount,empAmount) #This function gets the monthly salesdef getSales(): monthlySales = float(input('Enter the monthly sales $')) monthlySales = getSales() #call to get sales salesIncrease = getIncrease(monthlySales) return monthlySales #This function gets the percent of increase in salesdef getIncrease(monthlySales): storeAmount = storeBonus(monthlySales) salesIncrease = float(input('Enter percent of sales increase: ')) salesIncrease = float(salesIncrease) salesIncrease = salesIncrease / 100 return salesIncrease #This function determines the storeAmount bonusdef storeBonus(monthlySales): if monthlySales >= 110000: storeAmount = 6000 elif monthlySales >= 100000: storeAmount = 5000 elif monthlySales >= 90000: storeAmount = 4000 elif monthlySales >=80000: storeAmount = 3000 else: storeAmount = 0 return storeAmount #This function…What is the opposite of greater than?if L1={ab,b} L2={abb,bb} then L1L2= * O {ababb,abbb,abbab,bbab} O {ab,b,abb,bb} O {ababb,abbb,babb,bbb} O {abbab,abbb,bbab,bbb}