Ask user to input date to be added. Validate that the date must have the correct format, date must be a valid date, and because the to-do list would be useless if it's before current date, validate the date must at least be at the current date
Q: Cruise(sid, name, number of days. price, number of_stops) Port(pid, city, country, gumber. of stars,…
A: Procedure is a subprogram which is responsible for performing a particular task. A procedure is…
Q: Write a Python code snippet that uses readlines() to show the first line from the file ("Input.txt")…
A: Please find the answer to the above question below:
Q: Which Pyton statement is used to get the index of first occurence of value of variable 'n' in a list…
A: In python the index of a list is found by the method index(). The index method returns the first…
Q: Find the errors in the attached program, correct them and submit the corrected program ensuring you…
A: Actually, ASM stands for Assembly Language.
Q: This is the question I am stuck on - A personal phone directory contains room for first names and…
A: Actually,given NamePhone #Gina(847) 341-0912Marcia(847) 341-2392Rita(847) 354-0654Jennifer(414)…
Q: Redraw the segment so that it does the same processes under the same conditions, but is structured.…
A: Given segment contains flow of the events where diamond represents the condition and rectangle…
Q: Construct the data using the sample() function: # change n <- your id/100 n <- 12345/100 a <-…
A: Hi, I have prepared the required R code: n <- 12345/100 a <- sample(n, 30, replace = T) b…
Q: What change should be made to fix the code: def primes(up_to): result = [] for n in range(2, up_to):…
A: CODE(SCREENSHOT) : Explanation : in line 1 , function is defined. in line 2 , an empty list is…
Q: Implement the "Add song" menu item. New additions are added to the end of the list. Ex: ADD SONG…
A: Steps: Here I have only added the song menu item. First, you have to declare the variables pf the…
Q: Given num_rows and num_cols, print a list of all seats in a theater. Rows are numbered, columns…
A: Given :- Given num_rows and num_cols, print a list of all seats in a theater. Rows are numbered,…
Q: Modify the demo program to move the string from leftmost side to the rightmost side of the screen 5…
A: solution is given below:
Q: Write a Matlab program to generate two unit conversions tables using fprintf command. One table…
A: Vkmh = Vmph * 1.609 FN = Flb * 4.448 fprintf('Vkmh Vmph\n') for Vkmh = 0:100 Vmph = Vkmh /…
Q: CPP File #include "result.h" #include "Date.h" Result::Result() { m_name = ""; m_unitID = "";…
A: It is defined as the source code files for applications written in C++ programming language. A…
Q: What is the outpt Tör the int index = 0; int result = 1; while ( true ) { %3D ++index; if ( index %…
A: The answer is as follows.
Q: Given the current state in the list as shown on the right side, what is the value of variable it,…
A: Let's have look at the code first. The curr.next().element() is pointing to node with the value of…
Q: Which of the following set is the FIRST(S)?
A: FIRST(S): contains all terminals present in first place of every string derived by S
Q: Assign sub_lyric by slicing rhyme_lyric from start_index to end_index which are given as inputs.…
A: We need to write a code for the given scenario. Language used is Python.
Q: +_str_ + add_undergrad(name, email, gpa) Student + add_graduate(name, email, level) |- name : string…
A: Brief Introduction: We have to write a code in Python that will make sure that the gcd of numbers…
Q: The answer you are giving me over and over again doesn't make sense and it's the same code that…
A: In the message, the error is showing at line no: 62 The ERROR is because class Deck has no member…
Q: 1 !/bin/bash 2 if [ $† -eq 0 ]; then 3 echo "Usage:" echo "$0 userlist" echo "$0 userinfo " 4. 5 6…
A: In the given unix shell program we have to authenticate the user by taking a valid username and…
Q: Using Function Points identify EI,EO,EQ.EIF,LIF of given Spell checker. Words?Erors? Dic. name Doc…
A: Software size was originally determined in terms of kilo lines of code(KLOC). However, it is not…
Q: Which of the following is the correct way to set the second value in a list called nums to 5?
A: List: In programming languages, the List data structure is used to store multiple values or…
Q: Which of the following stream manipulator will set the floating-point precision to n places.…
A: Dear Student, In C++ , setprecision(int n) function is used to set decimal precision to format…
Q: ADD AX,3 HAS THE SAME RESULTS AS THE FOLLOWING Select one or more: a. INC AX INC AX INC AX b. ** INC…
A: We need to find the correct options regarding the given assembly statement.
Q: Write a matlab program for following vapor pressure , temperature data : Temp (C)…
A: Code to copy: clcclear allclose allT=[-36.7 -19.6 -11.5 -2.6 7.6 15.4 25.1 42.2 60.6 80.1];P=[1 5 10…
Q: Write a function that rotates the elements of the list k times. [You are not allowed to create any…
A: Here I have created a function to rotate the list to either left or right. In the function, I have…
Q: This is the question I am stuck on - A personal phone directory contains room for first names and…
A: import java.util.*; public class Main { public static void main(String[] args) {…
Q: sample run
A: C++ code to the given program. I have written using Dev C++. #include <iostream> #include…
Q: Which of the following functions is used to return a value add an index position in the list and…
A: About functions is used to return a value add an index position in the list and remove that item…
Q: This is the question I am stuck on - A personal phone directory contains room for first names and…
A: package Java.C.c; import java.util.*; public class LongestLine { publicstaticvoidmain(String[]…
Q: Difference between Append(), Insert(), Extend().
A: The answer is given in the below step
Q: a program that asks the user to input 2 lists of numbers, 5 numbers per y the common numbers in the…
A: Introduction of Program: The C++ program takes 5 elements in the first list and 5 elements in the…
Q: 3. sum_of_greatest_two Given three numbers, a, b, c, return the sum of the greatest two. Sample…
A: Start define function def sum_of_greatest_two(a,b,c): l=[] l.append(a) l.append(b)…
Q: Could anyone help me to write Junit test code to check the system allow a doctor to assign a new…
A: package Doctor.junit; public class JunitMessage{ private string message; public JunitMesssage(string…
Q: Which code snippet below correct ly writes the values in the list to a file, one value per line…
A: I have given an answer in step 2.
Q: 1: Compare output A Output differs. See highlights below. Special character legend Input Your output…
A: The correct one is given below.
Q: In Python: You can use the + operator to concatenate two lists True False
A: The correct option is (TRUE)
Q: Using the following snippet of code, introduce the walrus operator to re-write the code using less…
A: The walrus operator is a type of assignment operator. It is used to assign values to the variables…
Q: Q3)write M-file to find best polynomial which is fitting data (xi,yi); i=1:N? also, draw (in the two…
A: Task : Input the data from user. Fit the polynomial to the dataset. Plot the results.
Q: Question 03: 1. Write Python function that will merge two lists of sensor values into one list by…
A: As per the requirement program is completed. Algorithm: Step 1: Define list a Step 2: Define list b…
Q: Write a loop that replaces each number in a list named data with its absolute value in Python
A: The problem is based on the basics of loops in python programming language.
Q: CPP File #include "result.h" #include "Date.h" Result::Result() { m_name = ""; m_unitID = "";…
A: Using main function to implement this code to let the program and read the input file with the…
Q: 3. Write a script to know how many 1's is in the list numbers. Assign that value to the variable…
A: Note: We are authorized to answer one question at a time, since you have not mentioned which…
Q: Write a program to add a name to the list box when pressing add command and using the input box to…
A: Write the Coding at CommandButton1 ( Add) to add data into listBox. Private Sub…
Q: After execution of result, if you find in the MS-DOS result that NC changes to CY, it indicates, O…
A: After the execution of result, if NC changes to CY it indicates what?
Q: Given the following link list, please do the following: 2000 3600 2800 1500- link head 1500 63 3600…
A: PART a:- head.info = 2000 ( As head is containing 2000) head.link.link.link = 3600 (As head.link…
Q: CODE: #Get input file name fileOne = input("Enter the input file name :") #Get output file name…
A: Please mention if there is any problem with the solution.inputfile = input('Enter input file name:…
Q: Write one line of code ONLY. Print the sorted list, num from maximum to minimum, using the list…
A: Declare list num and then sort list in descending order print num
Q: Make a python module for the following function -Make "To Do" list - Add Events to Calendar After…
A: SUMMARY: - hence, we discussed all the points
Object-oriented
Use Java coding.
Step by step
Solved in 3 steps with 6 images
- The GTUC Company wants to produce a product orders report from its product orders file. Each record on the file contains the product number of the item ordered, the product description, the number of units ordered, the retail price per unit, the freight charges per unit, and the packaging costs per unit. Your algorithm is to read the product orders file, calculate the total amount due for each product ordered and print these details on the product orders report. The amount due for each product is calculated as the product of the number of units ordered and the retail price of the unit. A discount of 10% is allowed on the amount due for all orders over GHC100.00. The freight charges and packaging costs per unit must be added to this resulting value to determine the total amount due. using PSEDUCODEThe GTUC Company wants to produce a product orders report from its product orders file. Each record on the file contains the product number of the item ordered, the product description, the number of units ordered, the retail price per unit, the freight charges per unit, and the packaging costs per unit. Your algorithm is to read the product orders file, calculate the total amount due for each product ordered and print these details on the product orders report.The amount due for each product is calculated as the product of the number of units ordered and the retail price of the unit. A discount of 10% is allowed on the amount due for all orders over 100.00. The freight charges and packaging costs per unit must be added to this resulting value to determine the total amount due.HAHAAAAAAHN HNM1000 OHNM 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 27 28 30 31 32 section . data .section .text .globl _start start: pushq $4 pushq $3 call function-A addq $16, $rsp movg %rax, %rbx movq $1, rax int $0x80 .type function-A, @function function-A: pushq rbp movq rsp, rbp. subq $8, rsp movg 16(%rbp), %rbx movq 24 (rbp), rcx movg %rbx, -8(%rbp) label-A: #variable y #variable z cmpq $1, $rcx je label-B movq -8 (&rbp), rax imulg %rbx, srax movq krax, -8 (%rbp) decq rcx jmp label-A label-B: movq -8 (Srbp), rax movq rbp, rsp popq &rbp ret
- HAHAAAAAAHN HNM1000 OHNM 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 27 28 30 31 32 section . data .section .text .globl _start start: pushq $4 pushq $3 call function-A addq $16, $rsp movg %rax, %rbx movq $1, rax int $0x80 .type function-A, @function function-A: pushq Srbp movq rsp, rbp. subq $8, rsp mova 16 (%rbp), rbx movg 24 (rbp), rcx mova Srbx, -8 (Srbp) label-A: #variable y #variable z cmpq $1, $rcx je label-B movq -8 (&rbp), rax imulg %rbx, srax movq rax, -8 (%rbp) decq rcx jmp label-A label-B: movq8 (rbp), rax movq rbp, rsp popq &rbp retHAHAAAAAAHN HNM1000 OHNM 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 27 28 30 31 32 section . data .section .text .globl _start start: pushq $4 pushq $3 call function-A addq $16, $rsp movg %rax, %rbx movq $1, rax int $0x80 .type function-A, @function function-A: pushq rbp movq rsp, rbp. subq $8, rsp movg 16(%rbp), %rbx movq 24 (rbp), rcx movg %rbx, -8(%rbp) label-A: #variable y #variable z cmpq $1, $rcx je label-B movq -8 (&rbp), rax imulg %rbx, srax movq rax, -8 (%rbp) decq rcx jmp label-A label-B: movq -8 (Srbp), rax movq rbp, rsp popq &rbp retHAHAAAAAAHN HNM1000 OHNM 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 27 28 30 31 32 section . data .section .text .globl _start start: pushq $4 pushq $3 call function-A addq $16, $rsp movg %rax, %rbx movq $1, rax int $0x80 .type function-A, @function function-A: pushq Srbp movą rsp, rbp. subq $8, rsp movg 16(%rbp), %rbx movq 24 (rbp), rcx movg %rbx, -8(%rbp) label-A: #variable y #variable z cmpq $1, $rcx je label-B movq -8 (&rbp), rax imulg %rbx, srax movq rax, -8 (%rbp) decq rcx jmp label-A label-B: movq -8 (Srbp), rax mova Srbp, rsp popq &rbp ret
- Filename: runlength_decoder.py Starter code for data: hw4data.py Download hw4data.py Download hw4data.pyYou must provide a function named decode() that takes a list of RLE-encoded values as its single parameter, and returns a list containing the decoded values with the “runs” expanded. If we were to use Python annotations, the function signature would look similar to this:def decode(data : list) -> list: Run-length encoding (RLE) is a simple, “lossless” compression scheme in which “runs” of data. The same value in consecutive data elements are stored as a single occurrence of the data value, and a count of occurrences for the run. For example, using Python lists, the initial list: [‘P’,‘P’,‘P’,‘P’,‘P’,‘Y’,‘Y’,‘Y’,‘P’,‘G’,‘G’] would be encoded as: ['P', 5, 'Y', 3, ‘P’, 1, ‘G’, 2] So, instead of using 11 “units” of space (if we consider the space for a character/int 1 unit), we only use 8 “units”. In this small example, we don’t achieve much of a savings (and indeed the…You recently got a job as a library assistant. You are assigned to sort an archive of files. Files are marked by how old they are by years and you need to put the most recent files on the left.Here’s the stack of files- File 5 File 20 File 9 File 15 File 13 File 25 File 50 File 45 File 40 File 35 Which sorting algortihm would you use and why? The Head librarian handed you a file labeled as File 30. He told you, “I don’t care where other files are, just put this file in its place.” Use an algorithm to insert the file in the right place.There is no error checking in day_of_year or month_day. Remedy this defect.
- Sample Input. Note that these details stored in a text file called registration_data.txt Atikah 130437 R KICT Sumaia 154312 E KOE Halimah 134339 R. KIRKHS Khadijah 103483 R KICT Sarah 153430 KOS Umayr 183921 R KOE Izzat 129304 E КАHS Shuhaimi 112343 R KICT Amani 103292 E КОED AIFatih 179320 R КОР Shuhaimi 112343 R. KICT Amani 103292 КОED AIFatih 179320 R КОР Sample Output The registration data being read.... . .. Name Matric No Type of Registration Kulliyyah Registration Fee (RM) Amani Khadijah 103292 КОED 110.5 103483 KICT 130.0 Shuhaimi 112343 KICT 130.0 Izzat Atikah Halimah 129304 КАHS 110.5 130437 KICT 130.0 134339 KIRKHS 130.0 153430 KOS 110.5 Sarah 154312 KOE 110.5 Sumaia AlFatih Umayr 179320 КОР 130.0 183921 КОЕ 130.0 The sorted data has been successfully written...... WRRE RRE ERRThis exercise is to write a Decimal to Hex function using BYTE operations. See the Bitstreams.pdf on Canvas for a Bit/Byte Operation review. You can use a List, Dictionary or Tuple for your Hex_Map as shown below, but it's not necessary to use one. It is necessary to use Byte operations to convert the decimal to hex. The bitwise operations are also available as __dunders___. In question #6, I asked you to write a decimal to hex function: Write a function to convert a integer to hexidecimal. Do not use the Python hex function (i.e. hexnumber = hex(number)) to convert the number, instead write your own unique version (i.e. MYHEX: hexnumber = MYHEX(number)). Your function should not use any Python functions like hex, dec, oct, bin or any other Python functions or modules. Functions, like Python ORD, can be used to convert a string to a integer. The input number range is 0 to 1024. Most students submitted versions using this algorithm and the primary algorithm calculates list[index] using…Modify the code below the #S11icq Q5 comment as you enter code for this task. Modify the code that creates the variable sf to assign the value in index position 2 of the list fish Modify the loop to repeat exactly four times . Click on the Run Current Script function (use menu at top of Thonny). Match the following: 1. 18500967 2. 237233811 updated value of sm 3. 35 updated value of sg_h 4. 44 updated value of sg_c 5. 2 6. 3 6