7. Write a program for the paper computer that will read two numbers and print the absolute value of their difference. Load it in the computer's memory and set the computer up to execute it. 01 06 11 16 Clear & add IR IC Add Subtract Store 02 07 12 17 22 4 Multiply Divide 5 03 08 13 18 23 ACC Read 04 09 14 19 24 Print Transfer unconditionally Transfer on minus 05 10 15 20 25
Q: 4. Write a java program that will extract all 13-digit SEU student IDs from a text. Example: File…
A: Answer: I have done code and also I have attached code code screenshot as well as output.
Q: Implement the first round of AES ( Advanced Encryption Standard ) in python. Given a message…
A: Advanced Encryption Standard (AES) is a specification for encrypting electronic data published in…
Q: Write a computer program using in C++, where can input the data below manually or reading from a…
A: Answer :-)
Q: 6. What is printed by the following when executes? 1 str= "His shirt is red" 2 pos= str.find("is") 3…
A: Solution of question 6: Right answer - Option (D) 1 Explanation - Here find function of string is…
Q: Write a java program that stores, retrieves, adds, updates and search addresses as shown in gure.…
A: Actually, java is a object oriented programming language. It is a platform independent.
Q: Given a chess board, your job is to write a program that takes two squares x and y as input and then…
A: Code: #include <bits/stdc++.h> using namespace std; int dx[8]={-2, -2, -1, -1, 1, 1, 2,…
Q: en often play a memory game in which a deck of cards containing matching pairs is used. The cards…
A: #include <iostream>#include <cstdlib>#include <ctime>using namespace std;int…
Q: Write a MIPS assembly language program that generates a sequence of integers, such that each intege…
A: The solution is given below:
Q: Scanner kb = new Scanner(System.in); String t kb.nextLine(); String s = kb.nextLine(); int c = 0;…
A: Here, we have the set of lines of code in Java. The code iterates over the string t and checks if…
Q: Given the following memory word 10 10 10 10 generate the Hamming codeword?
A: Given memory word is, 10101010 In this, the length of the data sequence= 8 Then, number of parity…
Q: Write a Java program to take a String from the user & print the byte array obtained from that String…
A: Required: Write a Java program to take a String from the user & print the byte array obtained…
Q: Removing a duplicate code in the program.14 * is an example for Reverse engineering O Bad smell O…
A: A code which performs a certain work and if it is existing more than once in a program/software it…
Q: Write a program that replaces all occurrences of a word with anew word in all the files under a…
A: Program: //include the required header files import java.io.*; import java.util.Scanner;…
Q: Write a java program that will extract all 13-digit SEU student IDs from a text. Example: File…
A: It is defined as a high level object oriented programming language that runs on various platforms,…
Q: Write a Java program which reads a text file and prints the total number of lines, number of words…
A: import java.util.*;import java.io.*;class Test158 { public static void main(String args[]) throws…
Q: 3. Write a program to keep track of a hardware store inventory. For each item in the store the…
A: The following is the required C++:- #include<iostream>#include<iomanip>using namespace…
Q: 1. Type the expressions below in python interactively, and try to explain what's happening in each…
A: Refer to step 2 for the answer.
Q: 6. What is the value of sizeof(int)? (a) 1 (b) 2 7. What is the value of sizeof(uint16_t)? (a) 1 (b)…
A: The question is to select correct option for the given questions.
Q: Consider the following code fragment. After execution of the program fragment is finished, what is…
A: Explanation: The question is asked the value of x after the execution of code fragment. The last…
Q: Write a program to produce the first 100 Fibonacci numbers. A Fibonacci number is one that is the…
A: Here I have first of all taken a for loop to iterate for the next 100 times. Inside the loop, first…
Q: a list to store processes is used in this program, is it a queue or a general-purpose list?…
A: That program contain the process cycle , Burst Time , Waiting Time and Turnaround time so we can say…
Q: Assign the size of userInput to stringSize. Ex: if userlnput is "Hello", output is: Size of…
A: Given: To add a line of code in the given code.
Q: JAVA This should be easy I have this data.txt: 4 40 80 52 41 72 61 71 60 50 52 61 77 41 61 70 79 41…
A: Create a java program and a main class “Zzz” and create a main method to read “data.txt” file.And…
Q: Write a complete program in Pep/9 machine language (in binary) that loads a word from memory…
A: Ld r1 [0045] Add r1 #0264 Mov [003A], r1 Sw [003A]
Q: Write a program to replace all the vowels with empty spaces in a sentence. For example- if your…
A: Code : import java.util.*;class input{ public static void main(String[] args){ Scanner input = new…
Q: Given a chess board, your job is to write a program that takes two squares x and y as input and then…
A: /* We can solve this problem using BFS*/ #include <bits/stdc++.h> using namespace std; int…
Q: 13. Given the following Java loop, write the equivalent MIPS instructions. for (int i = 5; i < 75; i…
A: #working code li $t0, 75 #t0 is constant 75 li $t1, 5 #t1 is…
Q: Presented with a list of X objects, Jonathan made a program in Python which does the following:…
A: def fun1(l): a=l[-1] for i in range(len(l)-1,0,-1): l[i]=l[i-1] l[1]=a; return…
Q: Write a program that reads integers, finds the largest of them, and counts its occurrences. Assume…
A: We have to write a program that reads integers, finds the largest of them, and counts its…
Q: Write a java program to ask three people three questions about name, number of courses, and number…
A: Java program to ask three people three questions about name, number of courses, and number of credit…
Q: 50. Consider the following pseudocode fragment, where X is an integer variable that has been…
A: Given the pseudo-code for a program. Explanation is as follows:-
Q: Write a python code 3) Write a script that asks user to enter 10 integer numbers, creates a list…
A: Your python program is given below as you required with an output.
Q: Write a program in elixir to iterate over the list of strings and divide the whole list into smaller…
A: Here we write simple , divide the whole lists into smaller chunks. we assume as take 16 element in…
Q: Write a MATLAB program in a script file that finds a positive integer n such that the sum of all the…
A: Use an infinite loop to find the sum and keep on adding the Integer to Sum till the Sum is 3 digit…
Q: Write a program to replace all the vowels with empty spaces in a sentence. For example- if your…
A: I give the code in C along with the output and code screenshot
Q: Write a script using PHP that takes a link from the user and parses through its associated web page…
A: <!DOCTYPE html> <html> <head> <title>Web Crawler</title> </head>…
Q: (3) (a) A fair coin is flipped, if it lands on the head side, one dice is rolled and X is the…
A: a) A fair coin is flipped,if it lands on the head side,one dice is rolled and X is the resulted…
Q: analyze each program and figure out what is wrong with the memory management in the code and how to…
A: In this program malloc() function is used to allocate memory.malloc() syntax:pointer= (cast-type*)…
Q: 5.Encipher the word GO by grouping. For conversion of the alphabet to numbers, use A B C D E F G H I…
A: Solution::
Q: What this program portion is performing? MOV AX, 0300H MOV DS, AX MOV SI, 0010H MOV DI, 0010H MOV…
A: Copy AX= 0300H, DS= 0300H, SI= 0010H, DI=0010H, CL=0AH MOV AL,[SI]…
Q: Write a C program that will creates two processes P1 & P2. P1 will ask the user to enter an integers…
A: Given:
Q: Write a program in matlab to compeer between the value A and B ,when Ais greater than B it is…
A: We will use the compare operator to compute the following operation We will declare two variables A…
Q: linux5 [283] % python3 ab_consecutive.py Enter n and max allowed consecutives separated by spaces 4…
A: def pkl(s1, k,l): n = len(s1) pklr(s1, "", n, k,l) def pklr(s1, prefix, n, k,l): if (k…
Q: Write a program that prints a multiplication table using two FOR loops, like this: 2 3. 6. 7. 10 4.…
A: Algorithm: Start Set i=1 Set j=1 PRINT i * j Compute: j = j + 1 IF j<=10 goto step 4. PRINT "\n"…
Q: Write programs that will accomplish the desired tasks listed below, using as few lines of code as…
A: m) Copy the external code byte at address 007Dh to the SP MOV A, # 0 MOV DPTR, #007DH MOVC A, @DPTR…
Q: Could someone help describe what this program is doing please im quite stuck , thanks int main()…
A: Here, the given C code contains the following bugs : Used undeclared variables Entering a value in…
Q: In C-language expression, how is not equal to represented? Select one: a. != b. all of the…
A: To find the right option. In C-language expression, how is not equal to represented? Determine the…
Q: Write a java program that will compare the contains of 2 files and count the total number of common…
A: The complete JAVA program is given below with code and output screenshots
Q: Write programs that will accomplish the desired tasks listed below, using as few lines of code as…
A: Answer:
Q: Complete the following sentences by filling the right word To check if two string variables string1…
A: Solution : To check if two string variables string1 and string2 refer to the same memory address we…
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
- Make a program that prints the table of contents of a book where each chapter has the same number of sections, and each section has the same number of subsections. Example: Please enter the number of chapters 3Please enter the number of sections 3Please enter the number of subsections 3Chapter 1-Section 1.1--Subsection 1.1.1--Subsection 1.1.2--Subsection 1.1.3-Section 1.2--Subsection 1.2.1--Subsection 1.2.2--Subsection 1.2.3-Section 1.3--Subsection 1.3.1--Subsection 1.3.2--Subsection 1.3.3Chapter 2-Section 2.1--Subsection 2.1.1--Subsection 2.1.2--Subsection 2.1.3-Section 2.2--Subsection 2.2.1--Subsection 2.2.2--Subsection 2.2.3-Section 2.3--Subsection 2.3.1--Subsection 2.3.2--Subsection 2.3.3Chapter 3-Section 3.1--Subsection 3.1.1--Subsection 3.1.2--Subsection 3.1.3-Section 3.2--Subsection 3.2.1--Subsection 3.2.2--Subsection 3.2.3-Section 3.3--Subsection 3.3.1--Subsection 3.3.2--Subsection 3.3.3Write an address book program that stores your contacts' names and their email addresses. The names and email addresses are originally stored in a file called phonebook.in, in the format: Harry Potter t..d@hogwarts.edu Hermione Granger b..h@hogwarts.edu Ron Weasley r..b@hogwarts.edu Draco Malfoy m..s@hogwarts.edu Severus Snape h..e@hogwarts.edu Albus Dumbledore a..x@hogwarts.edu Your program should read from the file, storing the names and corresponding email addresses in a dictionary as key-value pairs. Then, the program should display a menu that lets the user enter the numbers 1 through 5, each corresponding to a different menu item: 1) look up an email address 2) add a new name and email address 3) change an email address 4) delete a name and email address 5) save address book and exit When the user enters 1, the program should prompt them for a name, and then print the corresponding email address. If there is no dictionary entry under that name, the program should print, "Sorry,…Write a program that displays the classic BINGO game, displays a BINGO card (5x5 square), and tests the bingo card for a winner via 2 users Steps: 1- Ask user 1 to enter 24 numbers between 10-40 no duplicates / check for range and repetition 2- Ask user 2 to enter 24 numbers between 10-40 no duplicates / check for range and repetition 3- Design 2 BINGO cards as you see below 4- Distribute the numbers onto the 2 cards with each user input with 0 in the middle 5- Display the 2 cards in 1 screen as you see below 6- Generate a random number between 10-40 no duplicates / check for range and repetition 7- Compare the random number with the numbers on the 2 cards 8- If the random number matches any number on each card, change the number on the card to 0 9- Check for winning cards 5 numbers in a row or column = 0 5 numbers in a diagonal = 0 all 4 corners of the card = 0 if any of the players won, display who is the winner and exit the program if the 2 players won, display both are the…
- Write a program that defines variables a, b, c, d as float and Num2 as integer. Solve the following expression on notebook by supposing some values of each variable, then execute your program for the same values and see the difference if any.a * (b - c / d) + ++ Num2 where a, b, c and d are float type variables.b) Write a program that defines variables Num1, Num2, Num3, and Num, as integer Solve the following expression on notebook by supposing some values of each variable, then execute your program for the same values and see the difference if any.Result= Num1 + Num2 / Num3 + Num + Num2++ where Num1, Num2 and Num3 are all integer type variablesc) Write a program that defines variables m, n, p, and amount, as integer Solve the following expression on notebook by supposing some values of each variable, then execute your program for the same values and see the difference if any.(m + n) / (p + amountWrite a program which reads the number of blocks the builders have,and outputs the height of the pyramids that can be built using these blocks.Write a Java program, GradeApp that reads a series of exam scores given as integers in the range 0 to 100. Display the total number of grades and the number of grades in each letter-grade category, followed class average (as a percentage with 2 decimal place): Use the value -1 as a sentinel value to indicate the end of the input. (The -1 value is used only to end the loop. Please do not use it in the calculations.)
- Write a program to read a sentence from the console. The program should read the input sentence from a user into an array of characters, up to and including the first full stop. For example, given as input A simple sentence. the program should output A simple sentence. But, note that the sentence could be spread over multiple lines. A multi-line sentence. For example: Input Result A simple sentence. A simple sentence. A sentence with a newline. A sentence with a newline. Only want first sentence. Not the second one. Only want first sentence. The code I was given: #include <stdio.h>#include <stdbool.h>#define MAX_MSG_LEN 256 int main(void){ char msg[MAX_MSG_LEN+1]; /* declare necessary variables */ /* read the message from the concole into msg[] up to the first full stop */ /* note that scanf will stop at first whitespace - so not the best to use */ /* note that fgets will stop at first newline - so not the best to use either */ /* better to use…Write a program to read several lines from a file. For each line, check (recursively) whether it is a palindrome. If it is a palindrome output the original string preceded by an integer (a counter) , like this: 1 : Sore was I, ere I saw Eros.2 : A man, a plan, a canal -- Panama Recall that a palindrome is a String that is the same backwards and forwards. Some examples of single words that are palindromes are: level, madam, racecar Phrases can also be palindromes if you strip out all the whitespace and punctuation and make everything the same case. Some examples are: Madam, I'm Adam A Toyota's a Toyota (See the palindrome video for more) You will need one method to eliminate whitespace and punctuation , make everything lowercase, and return the new string. Use the recursive method you wrote in L15Num2. This returns a string with no whitespace or punctuation, but not all the same case. Then (in main) convert that string to lowercase. You need a recursive method that takes the new…write in PYTHON LANGUAGECreate a program that will compute PRELIM, MID-TERM, PRE-FINAL, FINALS GRADES of a studentHow to compute quiz and exam = (raw score/total score)*50+50How to compute per period (quiz1+quiz2+quiz3)*60%+exam*40%How to compute FInal grade =(Prelimgrade*20%)+(Midtermgrade*20%)+(Pre-Finals*20%)+(Finalgrade*40%) Example output:PRELIM GRADEEnter Quiz1: ____Enter Quiz2: ____Enter Quiz3: ____Prelim grade = MIDTERM GRADEEnter Quiz1: ____Enter Quiz2: ____Enter Quiz3: ____Prelim grade = PRE-FINALS GRADEEnter Quiz1: ____Enter Quiz2: ____Enter Quiz3: ____Prelim grade = FINALS GRADESEnter Quiz1: ____Enter Quiz2: ____Enter Quiz3: ____Prelim grade = List of GRADESPrelim =Midterm =Pre-Finals =Finals =
- Write a program that reads an arbitrary number of integers that are in the range 0 to 50 inclusive and counts how many occurences of each are entered. Indicate the end of the input by a value outside of the range. After all input has been processed, print all of the values (with the number of occurences) that were entered one or more times.Please do this in PYTHON PROGRAMMING Write an address book program that stores your contacts' names and their email addresses. The names and email addresses are originally stored in a file called phonebook.in, in the format:Harry P..d@hogwarts.eduHermione G..h@hogwarts.eduRon W..b@hogwarts.eduDraco M..s@hogwarts.eduSeverus S..e@hogwarts.eduAlbus D..x@hogwarts.eduYour program should read from the file, storing the names and corresponding email addresses in a dictionary as key-value pairs. Then, the program should display a menu that lets the user enter the numbers 1 through 5, each corresponding to a different menu item:1) look up an email address2) add a new name and email address3) change an email address4) delete a name and email address5) save address book and exitWhen the user enters 1, the program should prompt them for a name, and then print the corresponding email address. If there is no dictionary entry under that name, the program should print, "Sorry, no contact exists…write a program that displays, in ascending order,the first names of those students who have attended more than one day of the course.If there are students with the same first name, display their first and last names.