Suppose that a teacher maintains a file ‘list.csv’, which contains the information of students in an academic unit. The information for each student (i.e., each row of the csv file) includes the student’s ID, surname, given name, and the individual marks for weekly tasks, assignment 1 & assignment 2. The teacher has written a python program, namely record.py, which undertakes the following four major operations on the ‘list.csv’ file:

Suppose that a teacher maintains a file ‘list.csv’, which contains the information of students in an academic unit. The information for each student (i.e., each row of the csv file) includes the student’s ID, surname, given name, and the individual marks for weekly tasks, assignment 1 & assignment 2. The teacher has written a python program, namely record.py, which undertakes the following four major operations on the ‘list.csv’ file: “Add” function. By running the command “python record.py add ”, the teacher can add the information of a new student into the csv file. “Delete” function. By running the command “python record.py delete ”, the teacher can delete the information of a student with the given ID. “Update” function. By running the command “python record.py update ”, the teacher can update the information of a student with the given ID. “Report” function. By running the command “python record.py report ”, the teacher can calculate and report the full mark and final grade of a student with the given ID. The detailed description for these functions of the program record.py is given in Appendix A. You are required to play the role as a software tester, undertaking the following tasks.

Suppose that a teacher maintains a file ‘list.csv’, which contains the information of students in an academic unit. The information for each student (i.e., each row of the csv file) includes the student’s ID, surname, given name, and the individual marks for weekly tasks, assignment 1 & assignment 2. The teacher has written a python program, namely record.py, which undertakes the following four major operations on the ‘list.csv’ file: “Add” function. By running the command “python record.py add

Read More

When we take the participant view of the user, we look at the entire context surrounding their activity. However, some interfaces are designed for activities that exist in different contexts.

When we take the participant view of the user, we look at the entire context surrounding their activity. However, some interfaces are designed for activities that exist in different contexts. First, select one activity you perform with a computer interface in multiple contexts. For example, you might use a text messaging app while walking down the street, sitting at your desk, eating a meal, or driving your car (though hopefully not!). You shouldn’t select text messaging: select some activity that is not used as an example in this question prompt. Then, discuss how the different contexts surrounding the app add different constraints or challenges to using the app. For example, with a text messaging app, your cognitive resources are more divided eating or driving, and your physical precision is less reliable while walking. Finally, describe how the design of the interface might be altered to perform differently depending on your context to overcome those constraints. You may assume that the interface is able to magically know your context. For example, if you were writing about text messaging, you could assume the app would know if you were driving, walking, or sitting. Hint: Context can differ subtly and change rapidly. For example, driving a moving car and sitting at a stop light are two subtly different contexts. If you were writing about text messaging, you might note that the user’s eyes are diverted to the road while the car is moving, and so the phone cannot rely on the user seeing it. A redesign might let the user dictate text messages while driving and be prepared to show them a large view of the draft message when the car stops at a stop light, allowing the user to quickly approve and send the message after checking for transcription errors.

When we take the participant view of the user, we look at the entire context surrounding their activity. However, some interfaces are designed for activities that exist in different contexts. First, select one activity you perform with a computer interface in multiple contexts. For example, you might use a text messaging app while walking down the street, sitting at your desk, eating a meal, or driving your car (though hopefully not!). You shouldn’t select text messaging: select some activity th

Read More

Create a Java Program called EX1C in Eclipse and add the project to your repo The java file

Create a Java Program, called “EX1C”, in Eclipse and add the project to your repo. The java file should thus be “EX1C.java” and it should contain all of your code. Make sure that your repo contains a complete eclipse java project, rather than just the java file. Your program should have two methods: “main()” and “compute()”. The compute method is a 0-arg method, and it should return a Double. It should also be public.Have main() call compute() and then print “COMP1050-” followed by your last nam

Read More

CS3443 Simulating 4bit MIPS ALU You are to write a gate level simulator for a simple 4bit ALU

CS3443: Simulating 4-bit MIPS ALU You are to write a gate level simulator for a simple 4-bit ALU with the following operations: - AND - OR - ADD (1-bit full adder) - SUB - SLT - Overflows/zero Detection All the operations and architectures to simulate are based on what we have studied in class. So, we'll review them before simulation. Note that the underlying number system is two's complement. You may use any language of your choice to write the simulator. 1) Input format (to be input from the command line): Opcode (in string) operand1 operand2 (both operands in integer): e.g., ADD 11110001, SUB 11110001, AND 11110001, OR 11110001, SLT 1111 0001 2) Output format (to be displayed on the screen): - For ADD, SUB, AND, OR: Opcode: 4-bit result, 1-bit overflow-detection, 1-bit zero-detection ADD: 0000,1,1 SUB: 1110,0,0 AND: 0001,0,0 OR: 1111,0,0 - For SLT: 1-bit result (0 or 1) SLT: 0001

CS3443: Simulating 4-bit MIPS ALU You are to write a gate level simulator for a simple 4-bit ALU with the following operations: – AND – OR – ADD (1-bit full adder) – SUB – SLT – Overflows/zero Detection All the operations and architectures to simulate are based on what we have studied in class. So, we’ll review them before simulation. Note that the underlying number system is two’s complement. You may use any language of your choice to write the simulator. 1) Input format (to be input from the c

Read More

begintabularll hline multicolumn1c Income multicolumn1c Tax for Single

Write a program in Thonny that will calculate income tax owed given wages, taxable interest, unemployment compensation, status (single or married) and taxes withheld. Taxpayers are only allowed to use this short form if adjusted gross income (AGI) is less than $120,000. Dollar amounts are displayed as integers with comma separators. For example, print(f"Deduction: ${deduction:,}").Hint – it will be one program but build this program in steps.Step 1 – Get Input - You will input wages, taxable interest, unemployement compensation, status (1=single and 2=married) and taxes withheld as integers.Step 2 – Calculate AGI - You are to calculate the adjusted gross income (AGI). It is calculated as wages + interest + unemployement. Output error message if the AGI is above $120,000 and the program stops with no additional output.Step 3 - Identify Deduction Amt - deduction amount based on status: (1) Single=$12,000 or (2) Married=$24,000. Set status to 1 if not input as 1 or 2. Calculate taxable income (AGI - deduction). Set taxable income to zero if negative.Step 4 – Calculate Tax Amount - Calculate tax amount based on exemption and taxable income (see tables below). Tax amount should be stored as a double and rounded to the nearest whole number using round().Step 5 – Calculate Tax Due or Refund - Calculate amount of tax due (tax - withheld). If the amount due is negative the tax payer receives a refund. Output tax due or tax refund as positive values You will be running the program with inputs based on your student number. You will divide your student number by 100 to get the amount for wages for run 1. For run 2, you would add $10,000Eg – my student number is 5921362, then my wages are $59,213 for run 1, and $69,213 for run 2.Run your program twice using the numbers in the table above, but replace the Wages with the wage based on your student number (student number / 100, student number / 100 + 10000).

Write a program in Thonny that will calculate income tax owed given wages, taxable interest, unemployment compensation, status (single or married) and taxes withheld. Taxpayers are only allowed to use this short form if adjusted gross income (AGI) is less than $120,000. Dollar amounts are displayed as integers with comma separators. For example, print(f”Deduction: ${deduction:,}”).Hint – it will be one program but build this program in steps.Step 1 – Get Input – You will input wages, taxable int

Read More

Write a Python function that takes as input three integers MN and r and returns an MN matrix of

Write a Python function that takes as input three integers, M, N, and r, and returns an MN matrix of rank r. Create matrices of different sizes and ranks, and use numpy.linalg.matrix_rank() to verify the returned matrices have the desired rank. Why should you expect a randomly generated matrix to have the rank you prescribe? What happens if you set r > min(M, N), and why does that happen? def randrank(M, N, r): A = random.randn(M, r) B = random.randn(N, r) return A.dot(B.T) R = randrank(32, 41, 7) print(R.shape, 'n') print(LA.matrix_rank(R), 'n') (32, 41) 7 (a) Use the function in Exercise #1 to generate a 5020 random matrix of rank r = 20, and visualize it. (b) Find the SVD of the matrix in part (a) using numpy.linalg.svd(). (c) Reconstruct the MN 2D array s with the entries of along its diagonal and zeros everywhere else: S = [s100000, s200000, sN00] if M > N, or S = [s1000, s2000, sM000000] if M < N (d) Verify that U.dot(S.dot(Vt)) recovers the matrix created in part (a). (e) Repeat (a) - (d) for a randomly generated 2050 matrix of rank r = 20.

Write a Python function that takes as input three integers, M, N, and r, and returns an MN matrix of rank r. Create matrices of different sizes and ranks, and use numpy.linalg.matrix_rank() to verify the returned matrices have the desired rank. Why should you expect a randomly generated matrix to have the rank you prescribe? What happens if you set r > min(M, N), and why does that happen? def randrank(M, N, r): A = random.randn(M, r) B = random.randn(N, r) return A.dot(B.T) R = rand

Read More

Write a program that determines the total amount for a set of tickets based off the following

Write a program that determines the total amount for a set of tickets based on the following prices. Create a function that accepts the class type (as its letter) and the number of tickets of that class. The function should return the total price for that number of tickets. The main function should ask the user for the number of tickets of each type that was purchased and then call the function for each ticket type to calculate the subtotal of each type. The total price should be outputted in the main function.

Write a program that determines the total amount for a set of tickets based on the following prices. Create a function that accepts the class type (as its letter) and the number of tickets of that class. The function should return the total price for that number of tickets. The main function should ask the user for the number of tickets of each type that was purchased and then call the function for each ticket type to calculate the subtotal of each type. The total price should be outputted in th

Read More