suppose that y=2, a=3, b=4, c=5. the value of y after execution the following code will be: load a mul b sub c jmplz m1 // if (acc <0) go to m1 store y m1 sub b add c Select one: O a. 5 O b. 8 O c. All choices wrong O d. 3 O e 7
Q: consider the code: import numpy speed = [100,86,88,88,111,86,103,87,94,78,77,85,99] x =…
A: Given python code And array of elements declared as speed import numpy…
Q: Write a program in Python that serves as a password checker. The string password that Python should…
A: Here I have declared the target string and a boolean variable to keep a record that the user enters…
Q: Coding Language is Python, keep it as simple as possible thanks. N one dimensional kingdoms are…
A: Algorithm: 1. Take the input from the user 2. Run the code for all test cases 3. Apply the condition…
Q: Categorize its Big-O efficiency. Also, assume that the statements represented by the ellipsis take 6…
A: X := 1repeatY := Nwhile Y > 0 do . . . // something (the ellipsis) Y := Y - 1endwhileX := X +…
Q: Write a program in Python that serves as a password checker. The string password that Python should…
A: Answer in step2
Q: University of Babylon College of Information Technology Department of Information Security…
A: Question 1: C++ Code: #include <iostream> using namespace std; int main(){ int marks;…
Q: nterruptions are occurrences that cause the usual flow of execution to be interrupted. Give five…
A: Introduction: Although interrupts have precedence over other signals, there are numerous types of…
Q: Q Execute 1> Share main.kt STDIN sh Result fun main(args: Array) { 10 y:- 25 Skotline nowarn main.kt…
A: The Answer is
Q: A machine with a certain status, called an ATM, is responsible for making payments in the amounts…
A: Please find the code and output below
Q: Create the following operations and include a menu-driven main program that will demonstrate your…
A: the program is an given below ;
Q: Being tired of the challenging assignments given by the MCS Professors, students have collectively…
A: -> CODE # Get Number of Roastsn = int(input()) # Get Number of Students and Professorsnum_stud =…
Q: Problem: Write a program that outputs all multiples of C between A and B. A, B & C are user inputs.…
A: Programming language is missing in the question. So we will answer this program in C, and C++…
Q: Scenario 2 a. Create an empty set. b. Read a counter. The counter will tell the number of times…
A: """Program to create set, add names, and count letters and names starts with A/a""" #create an empty…
Q: I want the code in C++. 7.10: Tic Tac Toe (sort of) Write a program that will allow two users…
A: the program is given below :-
Q: Round-Robin (RR): Write a Java program to implement a Round-Robin (RR) scheduling algorithm with…
A: Round-Robin scheduling algorithm using Java program
Q: suppose that y=2, a=3, b=4, c=5. the value of y after execution the following code will be: load y:…
A: Instruction Set Architecture of Assembly language One address instruction This uses an implied…
Q: Exercise 1. Let U = {a,b,c,d,e.f.g.h,k} A= {a,b,c,d}, B={d,ef.g}, C={a,cf}, D= {f,h,k} 1. Соmpule.…
A:
Q: ate a CFG graph for the following code b. Write minimum test cases for statement coverage c. Write…
A: It is defined as a non-linear data structure consisting of nodes and edges. The nodes are sometimes…
Q: What would the output if dynamic scoping is used. Consider that execution of the code starts from…
A: There are two types of scoping used while coding: Dynamic and Static Difference between Dynamic…
Q: ++ Write a program to store n integers in a chained hash table of 9 memory locations. Use h(k) = k…
A: The below code is to implement a chained hash table of 9 memory locations. The operations performed…
Q: 2. Series E by Jemar Jude Maranga Write a program that will print then items in the following…
A: I have written the correct code in C++ as an answer to this question in step 2. I have also provided…
Q: Which of the following statements best describes this code that is attempting to print the value of…
A: The solution for the above given question is given below:
Q: Q1. Write a C++ program to create the following sets (i) A = {x/x is a multiple of 3, 0 < x < 50}…
A: check the step 2 for program
Q: Suppose that the requirement is to maintain the value of j+k constant while incrementing k by 1.…
A: Here we have j+k equal to a constant value. Now we wish to increment the value of k by 1. Next, is…
Q: Write a program using the Loop instruction to print all letters each in a new line as follows (must…
A: Note : As per guidelines we are supposed to answer one question per post , please repost other…
Q: Write a python program to accept 2 numbers, if two numbers are same calculate Z=a2+b2, if modules of…
A: Algorithm: Start Read 2 numbers if two numbers are same Read a,b values calculate Z=a*a+b*b if…
Q: The value of AX,BX,CX,DX after executing the following code is: X DB 'TRACE*ME'CLD MOV AH,0 MOV CX,8…
A: Given: FInf the values of AX, BX, CX, DX After exxecuting the following code
Q: Develop JAVA code for the given problem statement: In Afghanistan N Taliban Soldiers are lined up…
A: As per the given problem statement we have to develop a JAVA code to find the position of the…
Q: lst = [10, 20, 30, 40, 50, 60, 70, 80] def f(lst, seek): for i in range(len(lst)): if lst[i] ==…
A: Here first we create a list lst with elements lst = [10, 20, 30, 40, 50, 60, 70, 80] Then will call…
Q: Priority Scheduling-preemptive
A: import java.util.*; /// Data Structure class Process { int at, bt, pri, pno; Process(int…
Q: Write a program in Python that serves as a password checker. The string password that Python should…
A: ANSWER:
Q: State the contents of r20 after the following program executes movi r10, 0x0020 movi r20, 5 movi…
A: Answer is " 9 ". Explanation : - r20 = 5 r21 = 2 r20 = r20 + r21 r20 = 5 + 2 r20 = 7 r20 =…
Q: READING CODE - STACK 2 47 mov al, 0; Return code of 0 mov ah, 4ch: Exit back to MSDOS int 21h list…
A: What is the purpose of lines 36 and 37? How does the assembler know where the start of the program…
Q: Being tired of the challenging assignments given by the MCS Professors, students have collectively…
A: a=int(input())b=int(input())c=int(input())li=[] x=["s1","s2","s3","s4"]y=["p1","p2","p3","p4"]for i…
Q: XOR AX, AX ADD AX,1 MOV BX ,2 PUSH BX PUSH AX РОP ВХ POP AX NEG BX
A: Given code XOR AX,AX ADD AX,1 MOV BX,2 PUSH BX PUSH AX POP BX POP AX NEG BX
Q: I Give the Final Values of X and Y. L. 2 3. Engl-2) Degl Eng(100) Eng(33) x- Deq y- Dego Enq(6) x-…
A: Let's understand step by step : Queue : In queue elements gets added at end side and removed from…
Q: READING CODE - STACK ;list the output of the following program assuming the input is as follows: 3…
A: What register is at the top of the stack right after line 26?
Q: The value of BX after executing the following piece of code is : * XOR AX, AX ADD AX,1 MOV BX ,2…
A: XOR instruction performs bitwise XOR operation. ADD instruction adds the two operands and save the…
Q: In the following code, the first printf() reached produces the output “14,” but the second printf()…
A: Explanation The reason for the second printf() to cause a bus error or a segmentation fault is that…
Q: Select one: def f(x1, yl, x2, y2): s = x1 * x2 + y1 * y2 O a. return s def f(x1, y1, х2, у2):…
A: The expression definition is pretty clear that it will execute to some value. So, let's start by…
Q: Command line arguments are passed to int main(int argc, char** argv) as arguments argc and argv. You…
A: Answer is attached below
Q: Instruction: A mathematician named Ulam proposed generating a sequence of numbers from any positive…
A: PROGRAM EXPLANATION Import the java.util package. Create the main class. Define the main method.…
Q: Write a program that prompts the user to enter a positive integer and then uses this criterion to…
A: Algorithm: Calculate the sum using the formula: Sum = a0 - a1 + a2 - ... + (-1)k ak. Inorder to get…
Q: Problem 2. VWrite a program Icm.py that takes two integers x and y as command-line arguments and…
A: Answer is given below .
Q: Make a simple checkbook balancer that would input a sequence of deposits (positive floating- point…
A:
Q: let S: r1(x);r2(x): w1(x);r1(x);w2(x);w1(y). Schedule S is said to be Select one: a. no serial and…
A: Here in this question we have given a schedule and we have asked that weather this schedule is…
Q: Find the contents of AX, BX and CX after execution of the following program: MOV AX, 6543h DEC AX…
A: The given program is:- MOV AX, 6543h DEC AX MOV CX, AX INC CX INC CX MOV BX, AX NOT BX ADD AX, BX…
Q: State the contents of r20 after the following program executes movi r10, 0x0020 movi r20, 5 movi…
A:
Q: a. Write a line by line explanation for the following program. b. Write a short paragraph on what is…
A: Actually, assembly language program is a low level language.
suppose that y=2, a=3 , b=4, c=5. the value of y after execution the following code will be:
- load a
- mul b
- sub c
- jmplz m1 // if (acc <0) go to m1
- store y
- m1 sub b
- add c
Step by step
Solved in 2 steps
- lst = [10, 20, 30, 40, 50, 60, 70, 80] def f(lst, seek): for i in range(len(lst)): if lst[i] == seek: return i # Return position immediately return None f(lst,50) What is the output of this code part? A)3 B)4 C)5 D)noneThe following program manages flight reservations for a small airlinethat has only one plane. This plane has SEATS number of seats forpassengers. This program processes ticket reservation requests from theairline’s website. The command R requests a reservation. If there is aseat available, the reservation is approved. If there are no seats, thereservation is denied. Subsequently, a passenger with a reservation canpurchase a ticket using the P command. This means that for every Pcommand, there must be a preceding R command; however, not every Rwill materialize into a purchased ticket. The program ends when the Xcommand is entered. Following is the program, but it contains seriousdesign errors. Identify the errors. Propose and implement a correctsolution.#include <stdio.h>#define SEATS 10int main(void){int seatsAvailable = SEATS;char request = '0';while (request != 'X') {scanf("%c", &request);if (request == 'R') {if (seatsAvailable)printf("Reservation…The following program manages flight reservations for a small airlinethat has only one plane. This plane has SEATS number of seats forpassengers. This program processes ticket reservation requests from theairline’s website. The command R requests a reservation. If there is aseat available, the reservation is approved. If there are no seats, thereservation is denied. Subsequently, a passenger with a reservation canpurchase a ticket using the P command. This means that for every Pcommand, there must be a preceding R command; however, not every Rwill materialize into a purchased ticket. The program ends when the Xcommand is entered. Following is the program, but it contains seriousdesign errors. Identify the errors. Propose and implement a correctsolution #include <stdio.h>#define SEATS 10int main(void){int seatsAvailable = SEATS;char request = '0';while (request != 'X') {scanf("%c", &request);if (request == 'R') {if (seatsAvailable)printf("Reservation…
- if the user enter the 4 digit pin that is letters not number the whole program crashes, can u implement data validation for the 4 digit numerical pin import tkinter as tkfrom datetime import datetime, timedeltaclass ATM: def __init__(self): self.accounts = {} def create_account(self): # Get user inputs first_name = first_name_entry.get() last_name = last_name_entry.get() dob = dob_entry.get() address = address_entry.get() debit_card = debit_card_entry.get() while len(debit_card) != 16 or not debit_card.isdigit(): debit_card = input("Invalid debit card number. Enter debit card number (16 digits): ") pin = pin_entry.get() while len(pin) != 4 or not pin.isdigit(): pin = input("Invalid pin. Enter 4-digit pin: ") # Create account and update GUI self.accounts[debit_card] = {"first_name": first_name, "last_name": last_name, "dob": dob, "address": address, "pin":…Please revise this code so that the outputs are correct. Current it’s flagging a syntax error. See screen shot. Also view the lab ( 2nd ) screen shot. Please use both inputs to produce both out outputs. 1st input: Testit test 1st output: Unsuccessful login attempt! Try again – you have four times left! 2nd input: Test Test1234 Second output: Successful login! Current code needs amended:  #class Login class Login: #__init__ def __init__(self): #initializing login_name as none self.login_name = 'none' #initializing login_password as none self.login_password = 'none' #check_credentials() def check_credentials(self, user_login, user_passwd): #initializing simlogin as 'Test' simlogin = 'Test' #initializing simpass as 'Test' simpass = 'test1234' #if user sent the correct credentials if user_login == simlogin and user_passwd == simpass: #print "Successful…What will be output to the screen when the following code is executed:def PrintMe(x): try: return s * 5 except: print("Error has occured") finally: print("Doing some cleanup")message = "HUE stands for Hadoop User Experience"print(PrintMe(message))
- Question 1 What will be displayed when the following code is executed?OOAAclass A:defBdefinit (self, i):15 6self i - iclass B(A):strreturn "A"(self):def main():def _init__(self, i, j):super().__init_(i)self.j = jb = B(5, 6)a = A (1)print (a)print (b)main() # Call the main functionNone of these answer choices is correct Full explainthe this question very fast solution sent me step by step Don't ignore any part all part work u Text typing work only not allow paper workUsing Java language Write a procedure that generates a regular heightfield in data-files/model/heightfield.off with elevation given by the grayscale values of an image file. Use a file dialog to select the file, a number box to scale the xx and zz integer coordinates by, and a number box to set the scale that 1.0 corresponds to for height. Make a button labelled “Generate” that launches the generator. Display a message on screen while generating and then flush the G3D::ArticulatedModel cache, and reload the current scene on completion./** * Makes a move on the board the board. Moves 'a' through 'e' shift the given row * to the left while moves 'A' through 'E' shift the given row to the right. * Moves 'v' through 'z' shift the given column down while moves 'V' through 'Z' * shift the given column up. * * @param m the move to make. * @throws IllegalArgumentException if the argument is not a valid move letter. */ public void move(char m) { throw new RuntimeException("Not implemented"); } The board is 5 X 5.
- CHALLENGE ACTIVITY 5.10.2: Simon says Simon Says" is a memory game where "Simon" outputs a sequence of 10 characters (R, G, B, Y) and the user must repeat the sequence. Create a for loop that compares the two strings starting from index 0. For each match, add one paint to userScore. Upon a mismatch, exit the loop using a break statement Assume simon Pattern and userPattern are always the same length. Ex The following patterns yield a userScore of 4: simonPattern: RRGBRYYBGY userPattern: RRGBBRYBGY Learn how our autograde works 13 14 simonPattern- scnr.next(); userPattern - scnr.nextO: 15 16 17 for (i=0; i<10; i++) { 18 if O[ simornPattern: 19 20 21 if ( 22 23 24 userPattern: 25 26 returns System.out.println("userScore: userScore); 매매Directions: Use a file city.txt for answering the questions that follow each scheduling algorithm. This file has three columns (comma separated): the first column contains the job Id, the second column indicates the CPU burst, and column three is the arrival time of the corresponding job. Parallel Programming It is vaccine season! COVID19 vaccines are out, and everyone is rushing to get one. Vaccines are available from six different brands and you have been entrusted to write a program to count the total number of vaccines of each brand administered across 21 cities in the state. Write a multithreaded program (in the file vaccines.cpp) that counts the number of vaccines in 21 different files of numbers. Each line in each of the files will contain either one of the following brand names: v1, v2, v3. Your program must count the number of units for each vaccine brand administered, across all 21 cities, and display the total number of units for each brand. The files are named…Count Dracula buys blood from tha public (AIDS tested, of course).But since he prefers certain types to others, he pays as follows:Type A 3000Type B 1800.75Type C (FOR AB) 2880.25Type 0 1500Write a program to input clients name, his/her blood type,and the volume (liters) of blood extracted. Loop exits wheninputted blood type is invalid. Output how much each customer will be paid. java (switch statement)