Q )write and apply porngincinc++) to convert Srom centigrate to fahrenleite wトere F =c x2 %3D
Q: def f(x): X 3.0 print (x) %3D X = 5.0 f(x) print (x) %3D
A: here given two mcqs which we will be discuss one by one in step2 and step3 respectively. question 2
Q: Let A = {a, b, c} and B = {u, v}. Write a. A × B b. B × A
A: Given: A={a, b,c} B={u, v} a.Cartesian product of set A and B is denoted by A×B A×B= {(a, u), (a,…
Q: int x = 5; X= x+63; printf('%d",x); Select the correct response:
A: The question consist of 3 stage in which firstly we define the integer with a value , then increase…
Q: 3- if y=sin(x), z=cos(x), v=exp(x), where -n<x <a could you plot y, z, v as shown below:
A: Algorithm : Step 1 : assign the value from -pi to pi to a vector x. Step 2 : find sin(x) and store…
Q: 9c) We can always store the sum of two integer values in an integer variable. T/F
A: Given statement: We can always store the sum of two integer values in an integer variable.…
Q: F(x, y, z) = xyz + x(yz)' + x'(y + z) + (xyz)'
A:
Q: mperature T to be 3 T •Op/T x*e* Cy = 9Vpk | dx, (ex – 1)2 - nere V is the volume of the solid, p is…
A: CODE: import mathfrom scipy import integrateimport matplotlib.pyplot as pltdef cV(T):V = 0.001 #…
Q: Q )write and apply, porngncinc+t) to convert Srom centigrate to fahrenleite wトere F=c x2 %3D
A: We need to write a C++ program to convert the centigrade to Fahrenheit. The formula given for…
Q: Q1: Write the result of the following: format compact Pi X - f = @(x) 3 * x.³– 2 %3D y = f(2)
A: Given: Required: to print output of the code from matlab
Q: x -4 -2 0 1 2 3 y -10 3 8 25 52 36 For the same data given for 7_1, a) Plot the data points with a…
A: matlab problem %%%%%%%%%%%%%%%%%%START OF CODE%%%%%%%%%%%%%%%%%%%%%%%%%%%close all;clear all;x=[-4…
Q: Write the following mathematical expression in C++. a. z = Vx? + y² + ]x – y| b. a = k + N-1 N
A: Kindly Note: As per our guidelines we are supposed to answer only one question. Kindly repost other…
Q: In the following expression, select the last operation you would complete. p - -(g v ~r) O 1) A 2)…
A: In the given expression p →~ (q v ~r) we have used two operations which are ,
Q: Assume $s1 = 0xefbcad97, $s2 = 0x6521fedc, calculate and $s0,$s1,$s2 or $s0,$s1,$s2 xor $s0,$s1,$s2
A: Answer: our guidelines is answer the first three subpart form the first question .So I have answer…
Q: Q1: Let A = {a, b}, B = {e} and C = {d,e}, find (A x B) x (B x C)? %3D
A: A={a,b} B={e} and C={d,e} Find (A×B)×(B×C) Cross product of two sets will form the ordered pairs.…
Q: Q2- The output of the following code is : a = 1; sin(a) a = 2; %3D O 0.4815 O 0.8415 O 1 O 2
A: Solution: B) 0.8415 Explanation: MATLAB a = 1; sin(a) a = 2; it follow line pattern so it…
Q: 11. (p→ (q→r)) ↔ ((p^q)+r) 15. Determine whether the following statement forms are logi- cally…
A:
Q: Suppose Pep/9 contains the following four hexadecimal values: A: 19AC X: FE20 Mem[0A3F]: FF00…
A: Suppose Pep/9 contains the following four hexadecimal values: A: 19AC X: FE20 Mem[0A3F]: FF00…
Q: 17. Please write the truth table for the following statement: p O q
A: ⊕ represents XOR XOR is the abbreviated form of Exclusive OR This will give us True only if both the…
Q: x=7; y=5; printf("Given x = %d and y = %d \n",x,y); printf("x/y produces: %f…
A: Explanation:- Two variables of integer type are declared. Initially their values are printed. Then…
Q: Create a function that calculates the following mathematical expression: z = 3x² +• + y² +em[x)
A: output
Q: (25-26) Verify that each of the following statements is a false statement by finding a…
A: The counter-example to the mathematical statement is the example that satisfies the statement’s…
Q: 4.(**) Write a MASM program that allows the user to enter two integers, and outputs to the screen…
A: answer starts from step 2
Q: What is the value of j after executing the following code: for j in range (50, 200, 3): print ("x")…
A: Loop in Python: A loop is a block of statements or code that keeps on executing repeatedly till a…
Q: 6- Using g(p) =p³ + p² + 1, find the output codeword for [D]=[0011] and [D]=[0010]
A: 1) Convert the polynomial into binary form. g(p) =p3+p2+1 [G] = [1101] 2) Add r 0's as LSB to data…
Q: Determine whether or not the following expressions are valid, i.e., whether the left- and right-hand…
A: As per our guidelines we are supposed to answer only one question. Kindly repost other questions as…
Q: 3. Write an m-file program to calculate x1 and x2, where -b7 V6? - 4ac X1, x2 = %3D 2a Find the…
A: Kindly change the values of a, b and c as per the parts. clcclear all a = 6;b = 5;c = 8;…
Q: ——— Rem (20, 6), returns the output<< 20 error O 3 120 2 O
A: The answer will be 2(option 5) Explanation:- Rem() function The Rem() function means remainder after…
Q: Polynomial You are given and integer M, and 4M integers, a1, a2, ..., aM, b1, b2, ..., bM, c1, c2,…
A: Program Explanation: Include the essential header files. Define the main function. Define variable…
Q: 4. (Check SSN) Write a program that prompts the user to enter a Social Security number in the format…
A: GIVEN: Develop a Java program to check whether the given SSN, Social Security Number is valid or…
Q: Select one: O a. Y = Em (1,2) %3D O b.Y = Em (3,4) O CY = Em (2.3) Ο dY- Σm (0,1)
A: SOP form is formed by adding the product terms. Basically, It is an OR operation. The product terms…
Q: C++, How can I modify this code to have up to 6 players (can be 2,3,4,5,6 player depending on…
A: #include <iostream>#include <ctime>#include <cstdlib>using namespace std;#define…
Q: - The f(x) = Vx – 2 defined at (-0,2] T O F
A: the function which you have mentioned is defined from (2,∞]
Q: 3. Display the sum of 28 + 2, using two variables: x and y. int y = 2; System.out.println (x + y);…
A: Answer - int x = 28;
Q: Implement the following function using? a)8x1 MUX b)4x1 MUX F=ABC'+A'BC'+A'BC+AB'C
A:
Q: Identify if the argument is VALID or INVALID by analyzing the truth table test below: (M ɔ (S v U))…
A: B)Invalid
Q: Write a MATLAB code to computes and print the results of following: A=sin(b), c=ln(b), d=log((a + b)…
A: Algorithm : 1 : First 1 to 10 will be stored in the vector b. 2 : Then sin() will calculated using…
Q: Need asap in JAVA 4. Reading data from movies.txt must handle invalid input. - Check for number of…
A: Following program read input from movie.txt file and check line by line integer or not. if nu8mber…
Q: vhat is the values of Y and F, t you khow A=1, B= Sum 2x4 high aCH D- deG Full oエ。 Addr AB
A: Given : Value of A = 1 Value of B = 0 Value of C = 1 Full adder 2 x 4 decoder 4 x 1 Mux
Q: C++ works from bottom to top O True O False
A: There are two types of approach in programming languages: Top-down approach: A large project/program…
Q: bllowing instancé óf the
A: Given: AS PER OUR POLICY “Since you have posted multiple questions, we will solve the first…
Q: Which of the following matches regexp /[a-z][\.\?!]\s+[A-Z]/
A: First [a-z] Match a single character present in between small a to small z. Then [\.\?!]…
Q: 3. Evaluate the following Postfix Expression 623 + - 38 2/ + * 2 & 3 +
A:
Q: Choose the correct result of the following given code. m = (lambda x, y: x if x < y else y)…
A: Given: Choosing answer
Q: Select one: -(-H) v D -(Hv -D) -(-H v D) -(H v D)
A: Correct Answer: D
Q: 344614.2153518.qu3zay7 1 def get_minutes_as_hours (orig_minutes): 2 3 return get_minutes_as_hours =…
A: Here I have created the function get_minutes_as_hour(). In this function, I have converted the given…
Q: H.W 1. Let A-f2.(2:6):1,0,1.0.1:5-2:-31. find the output of the following commands: a.…
A: The value stored in A is The output of the code in matlab is
Q: Let E = (a) and L = E. Which of the following belongs to 24? %3D O a. A O b. (A) Oc. 0 O d. (0)
A: We are given an alphabet set which contain single symbol 'a' and a language L. We are asked which…
Q: { int x, y = 1; For(x=0; x<50; x+ =5) { cout << x << “ “<<y; y ++; }}
A: C++ programming
Step by step
Solved in 3 steps with 2 images
- - lLogde (4t Fwfimm -Qo Fr@c‘v —%M’v foo oo Yuamberts by from 2computer science | c++ code | it's not graded. Correct answer will upvoted else downvoted. It is given a non-negative integer x, the decimal portrayal of which contains n digits. You need to shading every its digit in red or dark, so the number shaped by the red digits is separable by A, and the number framed by the dark digits is detachable by B. No less than one digit should be shaded in every one of two tones. Consider, the include of digits hued in red is r and the include of digits hued in dark is b. Among all potential colorings of the given number x, you need to output any to such an extent that the worth of |r−b| is the base conceivable. Note that the number x and the numbers shaped by digits of each tone, may contain driving zeros. Input :The principal line contains one integer t (1≤t≤10) — the number of experiments. Then, at that point, t experiments follow. Each experiment comprises of two lines. The main line contains three integers n, A, B (2≤n≤40, 1≤A,B≤40).…Use the Bash shell for the completion of this project.Develop a shell scripting application that allows the user to perform some advanced mathematicaloperations: Task 3: Find the numbers that can be expressed as the product of two nonnegative integers in succession and print them in increasing order. For each number found the program should check whether the number is a multiple of 5 and indicate this in the output. (For example, 30 is such anumber as it can be written as the product of 5 and 6 (30=5x6), which are two numbers in succession.) The user should specify how many such numbers they want to print.
- QUESTION 18 Int xt= 200 int yt 100; Int d1, d2; LAm( mov EAX, x1: mov EBX, y1: push EBX pop ECX mov d2, ECX: mov d1. EAX: What is d2 in decimal format? 100 1200 400 O 300 QUESTION 19 Int xt200; int yt 100; int 0, z1 int d1, 2 mov EAX xt: mov EBX vt: mov a0, ESP, assume inta ESP aoss push EAX mov d1, EAX mov z1, ESP push EBX mov 2, EX mov 2. ESP What is dt n decimal format? 200 0.100 QUISTION 20 CA N end C4 A ws al annThe value of BX after executing the following piece of code is : * XOR AX, AX ADD AX,1 MOV BX ,2 PUSH BX PUSH AX РОOP ВX РОP АХ NEG BX 1 FFFF FFFECode it output needYou are given a m x n 2D grid initialized with these three possible values: -1: A wall or an obstacle. 0: A gate. INF: Infinity means an empty room. We use the value 2^31 - 1 = 2147483647 to represent INF as you may assume that the distance to a gate is less than 2147483647.Fill the empty room with distance to its nearest gate.If it is impossible to reach a gate, it should be filled with INF. For example, given the 2D grid: INF -1 0 INF INF INF INF -1 INF -1 INF -1 0 -1 INF INFAfter running your function, the 2D grid should be: 3 -1 0 1 2 2 1 -1 1 -1 2 -1 0 -1 3 4""" def walls_and_gates(rooms): for i in range(len(rooms)): for j in range(len(rooms[0])): if rooms[i][j] == 0: dfs(rooms, i, j, 0) def dfs(rooms, i, j, depth): if (i < 0 or i >= len(rooms)) or (j < 0 or j >= len(rooms[0])): return # out of bounds if rooms[i][j] < depth:…
- 1 BAWIn B S ser/ex22399/lab Tabs Settings Settings ncher & Help SARR AS O P in (R QC CXNNN V for i in range (dim2): X Assignments 1 ■ с Code Validate Python 3 (ipyke Compute the code that return the matrix M = AT A for a given matrix A - the superscript T denoted the transpose. I have started the code for you, which gets the dimension of the matrix, and creates the zero matrix of the correct size. I have also provided some of the loops involved. 1: # perform and return the multiplication of $A^TA$ import numpy as np def multiply_At_A (A): # these lines set up the correct dimensions of the returned matrix. # the matrix A is of dimension dim1 x dim2 - dim1= A.shape [0] dim2 = A.shape [1] matrix = np.zeros([dim2, dim2]) # the matrix A^T (transpose of A) is dim2 x diml # the matrix (A^T A) is of dimension dim2 x dim2 I return matrix X Python_coursework.ipynb X + for j in range (dim2): # complete the final loop to compute matrix[i,j] # YOUR CODE HERE : ## Don't write any code in this box 1:…{python language}Dan’s recently announced that he’s teaching n top-secret courses next semester. Instead of enrolling in them through ACORN, students need to email Dan to express their interests. These courses are numbered from 1 to n in some arbitrary order.In particular, if a student named s is interested in taking a course c, they need to send an email to Dan containing the message c s.Notethatifastudentis interested in taking multiple courses, they need to send multiple emails, one per course.Upon receivinga message c s,Danl ooks at the list of students already enrolled in course c. If there’s already a student on the list whose name is too similar to s, Dan assumes s is the same student and ignores the message. Otherwise, he enrolls s in the course.Dan considers two names too similar if and only if they have the same length and differ in at most one letter (note that “a” and “A” are considered the same letter). For example, “Josh” and “Josh” are too similar. “Sam” and “CaM” are…Pb#1: For several values of x, confirm that eix = cos x + i sin x Pb#2: An object thrown vertically with a speed vo reaches a height h at time t, where h= vo*t - gt2 Write and test a function that computes the time t required to reach a specified height h, for a given value of vo. The function's inputs should be h, vo, and g. Test your function for the case where h=100 m, vo=50 m/s. and g=9.81 m/s2. Interpret both answers. (MATLAB)
- Write a DECIMATOR function that takes a unit of character and minimizes it (i.e. removes the last 1/10 of characters). Always zoom in: if a bullet unit has 21 characters, 1/10 of the characters will be 2.1 characters, so DECIMATOR removes 3 characters. DECIMATOR is not kind! Examples decimator ("1234567890") 12 "123456789" # 10 characters, taken out 1. decimator ("1234567890AB") # 12 characters, 2 are released. "1234567890" decimator ("123") "12" # 3 characters, taken out 1. decimator ("123456789012345678901") # 21 characters, issued 3. Solve in Ruby "123456789012345678"Write a function that sums all the numbers of the major diagonal in an nxn matrix of integers using the following header:def sumMajorDiagonal(m):The major diagonal is the diagonal that runs from the top left corner to the bottom right corner in the square matrix. Write a test program that reads a 4x4 matrix and displays the sum of all its elements on the major diagonal.The surface area S of a ring in shape of a torus with an inner radius r and a diameter d is given by: S = n²(2r + d)d The ring is to be plated with a thin layer of coating. The weight of the coating W can be calculated approxi- mately as W = ySt , where y is the specific weight of the coating material and t is its thickness. Write an anonymous function that calculates the weight of the coating. The function should have four input arguments, r, d, t, and y. Use the anonymous function to calculate the weight of a gold coating (y = 0.696 lb/in.³) of a ring with r = 0.35 in., d = 0.12 in., and t = 0.002 in. Function e C Reset I MATLAB Documentation 1 function W = myFunction(r,d,t,ga) 2 %Write code here 3 end