(1) what is the output of the this code A = [2 1; 0 2] ;B=3 ;C = A + B (in editor window)? (A) a) 5 2 45 B) 5 4 4 3 C) 5 4 35 D) 4 5 5 3 c=a.^3 (in editor window)? (2) What is the output of this code a=2:7 (A) [8 343] (B) [2 3 4 56 7] (C) [343 216 125 64 27] (D) .[8 27 64 125 216 343] (3) What happens if we don't assign a variable to an expression which evaluates a numerical value? (A) MATLAB shows error (B) Nothing happens (C) The evaluated values are assigned to a variable ans automatically (D) Depends on the numerical value
Q: What is the purpose of the following line in the code below “STARTS CURRENT_TIMESTAMP + INTERVAL 3…
A: answer is b b.Specifies that the event should be fired every 3 minutes after the time it was…
Q: using a raspberry pi , create a code in python for a brightness controlled led here are the…
A: Libraries Required : rpi_ws281x Adafruit-circuitpython-neopixel Adafruit-blinka
Q: a=[0,0,0] deftransformArray(a): a[1]=99 def main(): a=[3,5,6] transformArray(a) print (a)…
A: Answer: C) [3,99,6]
Q: What would be the output of the following code (in editor window)? A = [O 1; 1 0]; B=2; C = A + B…
A: Please find the answer below
Q: (1) what is the output of the this code A = [2 1; 0 2] ;B=3 ;C= A + B (in editor window)? (A) a) 52…
A: As per our company guidelines, we are supposed to answer only three subparts. Please repost other…
Q: 1. Implement 2D package which contains: Drop down list for the following Requirements: a. Change the…
A: According to the question , we have to implement 2D package which contains several parts . In step…
Q: Using JAVA, create a menu of the four lists, have the user select one item each and calculate the…
A: Algorithm : Step 1 : declare string arrays for processers, graphics cards, memory and monitors.…
Q: . Sarah Cruz has been working for COMPUTER Z Company for four years. Last year, Sarah received a 5%…
A: Note : Answering the question in python language is mentioned. Input : Input salary of Sarah %…
Q: Make a JavaScript program that will ask for a 4-digit numeric PIN code for an ATM machine. When the…
A: According to the Question below the Solution: Output:
Q: QUESTION 5 Find f (2), f (3), f (4), and f (5) if f(n+1)=f(n)+3f(n-1 For the toolbar, press ALT+F10…
A: Solution - In the given question, we have to find the values of f(2), f(3), f(4) and f(5).
Q: In this assignment you are required to implement the following using convolution . a) apply sharpen…
A: In this assignment you are required to implement the following using convolution . a) apply sharpen…
Q: question has to do with Java programing. I am attempting to do a Regex Lab and read in a text file…
A: Java programs are frequently asked in the interview. These programs can be asked from control…
Q: Assume we are creating an application that allows multiple users to form groups and write a story…
A: The application should have an interface between the database and the users. This application will…
Q: 2) Write a java script Program to display an ALERT box using ONCLICK event.
A: <html> <head> <script type = "text/javascript">…
Q: Write a calculator program that accepts commands from command line. The program has the following…
A: Based on python.
Q: The next set of questions refer to our knowledge of the line editor, vi. There are three modes of…
A: Hey there I am writing the required solution for the above stated question. Please do find the…
Q: Consider the expression: ?=−?∗(?+?) Write the three – address code for this expression and…
A: Given expression is ?=-?*(?+?) Every expression is represented in three address code and also there…
Q: write a code for a rasperberry pi that allows Brightness Controlled Led using photo resistor here…
A: For python, we need to use RPi.GPIO library. import RPi.GPIO as GPIOimport…
Q: Checkpoint 1.32 Enter a command-line statement that will compile a Java program name Test.
A: save program . click on start menu type cmd in search box. open cmd go to the directory where java…
Q: Task 10 Write a python program that finds the corresponding energy values from a list of frequency…
A:
Q: Executing in the command window the following code returns. a = [1:3]' ;size(a)
A: Required:
Q: of emoji: small, medium, large Process: Create 3 emoji that you want to use Constraints: No…
A: Type of emoji Size of emoji: small, medium, large Process: Create 3 emoji that you want to use…
Q: 35. What is the output of line 44? 36. What is the output of line 45 37. What is the output of…
A: Class is a user-defined data type that encapsulates the variables and methods. An instance of a…
Q: The result of this equation is 5*2 1 23 6+8 9.7917 9.6875 0.8393 :The clear function used for + To…
A: Answer:
Q: Write about navigation and configuration/com- attacked by web s patibility testing. Write about…
A: The Answer is
Q: Write an Arduino sketch (code) along with the comments to display the temperature data from a…
A: Temperature Sensor with Arduino The Arduino is one of the IDE, known as the Integrated Development…
Q: QUESTION 14 Which lines of the following code contain syntax error? which line can create runtime…
A: Dear Student, 1) Syntax errors is at line numbers 8, new blank string declaration syntax is - String…
Q: We want to create a program that continuously turns pin 13 ON waits for 1second then turns pin 13…
A: See the program given below Follow the instructions to turn PIN 13 on or off with a delay of one…
Q: In javafx create User Menu Screen class )Loaded by Login Accepts user level and displays menu based…
A: ANSWER: JavaFX: JavaFX is a bunch of illustrations and media bundles that empowers engineers to…
Q: What Do I Do? 1. What will get printed as output? a = [ 10, 20, 30, 40, 50] a.remove(30) print(a) 2.…
A: The above question is coded in python language.
Q: IO class provides input and output through _________
A: Question. IO class provides input and output through _________
Q: RGB LED fading colors project. Write comments for the below C code explaining each line. Code is…
A: RG B LED fading colors project. The comments for the given code is given below:
Q: Write a carpet bombing program in code blue that zeros out all of memory( with the possible…
A: L1 COPY #0, @mptr ; Copy “0” at the location where memory ; Pointer points to ADD #1, mptr ;…
Q: Use Regular Expressions to write the python code for following” a. Search all appearances of…
A: Summary: A RegEx, or Regular Expression, is a search pattern made up of a series of characters.To…
Q: Given the following data declarations and code (within main), what is printed to the console window?…
A: The Answer is in Below steps
Q: What result would appear on the console after the following code fragment is executed? Options: a.…
A: ANSWER:-
Q: What is the output from the following code: IdentifyMyParts a = new IdentifyMyParts();…
A: We have to discuss what is the output of the following Code: *) We have to used public class…
Q: What will be the final value in EDX after this code executes?…
A: mov edx, 1 ;This instruction loads the value 1 in edx register. mov eax, 7FFFh…
Q: Write Arduino sketch (code) along with the comments to display the temperature data from a…
A: Temperature Sensor with Arduino The Arduino is one of the IDE, known as the Integrated Development…
Q: 2. The $# Variable stares the number of Command-line arguments passed. -- Since $# holds the number…
A: 2.So basically, $# is a number of arguments given when your script was executed. Yes it is true…
Q: CHALLENGE ACTIVITY 9.3.2: Input parsing: Reading an entire line. Write a single statement that reads…
A: Given: We have to write a single statement that reads an entire line from string. Assign…
Q: In this project you will implement a program that simulates a simple text editor with the undo/redo…
A: Answer #include<stdio.h>#include<string.h>#include<stdlib.h>char data[100][100];…
Q: What is the output? image attached A. 0 B. ArrayIndexOutOfBoundsException C. 6
A: Here first we create a array of integer of size 5. int[] mList = new int[5]; mylist.length will…
Q: Please answer number 1 and 2 as they are all linked altogether with the subparts by following the…
A: It is defined as a object-oriented programming, platform-independent, and secure programming…
Q: . Take a look at Example Code Ch 11-1: If an ArithmeticException occurs in m3's attempt argument, it…
A: Here is the solution which is mentioned below:
Q: 17. Which statement is true about what will happen when the example code runs?1: main PROC2: mov…
A: Given the assembly code: main PROCmov eax,30push eax push 40call Ex3SubINVOKE ExitProcess,0main…
Q: a) How to change the message icons in JOptionPane by using the help features of the Java IDE. Create…
A: Message dialogues give the user information. The JOptionPane.showMessageDialog() method is used to…
Q: Which of the following statements shows the result of executing the following line in the editor…
A: abs() function returns the absolute value of a number.
Q: 6- Consider the following 5 lines of MatLab code entered in the MATLAB command window: »x-[7777]; »Y…
A: The given program is the MATLAB program, so run the program on the MATLAB compiler and try to…
Step by step
Solved in 4 steps
- Write programs that will accomplish the desired tasks listed below, using as few lines of code as possible.Use only opcodes that have been covered in class. Comment on each line of code. m) Copy the external code byte at address 007Dh to the SP n) Copy the data in register R5 to external RAM address 032Fh o) Copy the internal code byte at address 0300h to external RAM address 0300h p) Swap the bytes in TIMER 0 ; put TL0 in TH0 and TH0 in TL0 q) Store DPTR in external RAM locations 0123h (DPL) and 02BCh (DPH) r) Exchange both low nibbles of registers R0 and R1 ; put the low nibble of R0 in R1, and the low nibble of R1 in R0QUESTION 11 What will be the output of the following Python code snippet? A. 4 3 2 1 B. 1 2 3 4 C. -1 -2 -3 -4 D. errorWrite programs that will accomplish the desired tasks listed below, using as few lines of code as possible.Use only opcodes that have been covered in class. Comment on each line of code. m) Copy the external code byte at address 007Dh to the SPn) Copy the data in register R5 to external RAM address 032Fho) Copy the internal code byte at address 0300h to external RAM address 0300hp) Swap the bytes in TIMER 0 ; put TL0 in TH0 and TH0 in TL0q) Store DPTR in external RAM locations 0123h (DPL) and 02BCh (DPH)r) Exchange both low nibbles of registers R0 and R1 ; put the low nibble of R0 in R1, and the lownibble of R1 in R0s) Store the content of register R3 at the internal RAM address contained in R2. (Be sure the addressin R2 is legal)t) Store the content of RAM location 20h at the address contained in RAM location 08hu) Store register A at the internal RAM location address in register A
- 5.19.1: LAB: Output range with increment of 5 Python code: n1=int(input())n2=int(input())if(n1<n2): while(n1<n2 + 1): print(n1, end=' ') n1=n1+5else: print("Second integer can't be less than the first.") i'm getting the following error : Output is nearly correct; but whitespace differs. See highlights below. Input -15 10 Your output -15 -10 -5 0 5 10 Expected output -15 -10 -5 0 5 10 ( whitespace error) There is supposed to be a space or new line after integer 10. i'm not sure where my mistake is.Can you show me the screen shot of the output consoleof the following assembly code please INCLUDE Irvine32.inc .DATA whiteProb BYTE 3 ; probability of white is 30% blueProb BYTE 1 ; probability of blue is 10% greenProb BYTE 6 ; probability of green is 60% .CODEmain PROC call Randomize ; initialize random number generator mov ecx, 20 ; loop 20 times jmp displayText ; jump to displayText to start the loop displayText: ; generate random number between 0 and 9 call RandomRange ; returns random number in EAX mov edx, 0 ; set default color to white cmp eax, whiteProb ; compare with white probability jbe whiteSelected ; jump if less than or equal to white probability cmp eax, blueProb ; compare with blue probability je blueSelected ; jump if equal to blue probability cmp eax, greenProb ; compare with green probability ja greenSelected ; jump if greater than green probability whiteSelected: mov…We will use Venus RISC-V simulator for the lab. Please save screenshot of code and output Based on fib.s, please rewrite the code to print full Fibonacci sequence to the console. For example, if n = 5, print 0, 1, 1, 2, 3. Test your program by varying n. Please save the screenshot of the two following test cases: 1) n = 10 2) n = 18 Save your code as task1.s. Here is the fib.s: .data .word 2, 4, 6, 8 n: .word 9 .text main: add t0, x0, x0 addi t1, x0, 1 la t3, n lw t3, 0(t3) fib: beq t3, x0, finish add t2, t1, t0 mv t0, t1 mv t1, t2 addi t3, t3, -1 j fib finish: addi a0, x0, 1 addi a1, t0, 0 ecall # print integer ecall addi a0, x0, 10 ecall # terminate ecall
- Need help with step 4. Below are my work for steps 1 and 2 and 3 are the screenshot codes. THIS IS MY CODE FOR STEP 1 - import java.util.Scanner;//to readinputpublic class Main{ public static void main(String[] args) { String s1,s2,s3;//to store 3 names Scanner sc = new Scanner(System.in);//to read input //reading 3 names from user System.out.println("Enter three names :"); s1=sc.next(); s2=sc.next(); s3=sc.next(); System.out.println("Descending order:"); //printing 3 names, in descending order if(s1.compareTo(s2)>=0 && s2.compareTo(s3)>=0)//if s1>=s2>=s3 { System.out.println(s1+"\n"+s2+"\n"+s3); } else if(s1.compareTo(s3)>=0 && s3.compareTo(s2)>=0)//if s1>=s3>=s2 { System.out.println(s1+"\n"+s3+"\n"+s2); } else if(s2.compareTo(s1)>=0 && s1.compareTo(s3)>=0)//if s2>=s1>=s3 { System.out.println(s2+"\n"+s1+"\n"+s3); } else if(s2.compareTo(s3)>=0 &&…Create a three address statement and convert the three address statement into machine code fromthe following snippet of program input:int i, a, b;a=0;b=0;for (i=10; i>0; i=i--){if (a%2 ==0 && a<b) b = b + 4;else b = b + 5;}Consider the Dumbo program given below. i. Use locations A, B; ii. Output "Give A and B: "; iii. A = 48; iv. B = 210; v. B = A + B; vi. A = A + B; vii. Output A; viii. Output B; What value will be printed by the statement 'Output A'. and output B
- Given the following memory word 10 10 10 10 generate the Hamming codeword?For python, 25) What is the value of "c" after the following code executes? a = [10, 50, 20] b = [30, 60, 40] c=b+a a. [10, 20, 30, 40, 50, 60] b. [10, 50, 20, 30, 60, 40] C. [30, 60, 40, 10, 50, 20) d. error 26) What is the value of aList after the following code is executed? alist = [1, 2, 3, 4, 5] alist.pop() alist.pop(3) aList.remove(2) aList.append(2) a. [1, 2, 4] b. [1, 3, 2] c. [2, 4,2] d. error 27) What values does counter variable i assume when this loop executes? for i in range(30, -10, -10): print(i, end = "") a. 30 20 10 0 -10 b. 30 20 10 0 c. 20 10 0 d. 30 20 10Write an assembly language program to convert Fahrenheit temperatures to theirequivalent in Celsius. The formula is:Celsius= ( 5/9 ) * (Fahrenheit - 32)Prompt the user for the Fahrenheit temperature and then display the Celsius temperatureas an integer.Remember that 5/9 = 0 with a remainder of 5!For most of you, you will lose points because you did not test your code well enough.Make sure and think of as many realistic test cases as possible. Using a similar format to the program below with dosbox