Write a program named subtract.asm that does the following using LC3 assembly language:
Print a prompt "PRESS TWO KEYS: " Note that the prompt MUST LOOK EXACTLY like the above, with a colon and a space after the word KEYS with no newline. Get a two key press from the user. Subtract the second characters ASCII code from the first characters ASCII code. If the result is positive, print the word POSITIVE. Turn in subtract.asm to the appropriate submission point on Web-CAT.
In: Computer Science
1) Open a new terminal.
a) Use the runlevel command. What is the current run level of your
system?
b) Use the command ls /usr/lib/system/system . What does this
show?
c) Use the command ls /etc/rc.d. What does this show?
d) Use the command ls/etc/rc.d/init.d. What SysV daemons are
available on your system?
e) Type init 3 and press Enter. The type runlevel. What is the most
recent runlevel?
f) Type init 1 and press enter. Does the runlevel command show the
recent level to change?
2) Describe what the /etc/inittab file does.
In: Computer Science
CompTIA Linux+ Guide to Linux Certification (4th Edition)(Please do not do it in a mac and add pictures of the machine.)
Project 2-2 In this hands-on project, you explore some command-line terminals on a Linux system and enter some basic commands into the BASH shell.
1. After your Linux system has been loaded, you are placed at a graphical terminal (tty1). Instead of logging in to this graphical terminal, press CtrlþAltþF2 to switch to a command-line terminal (tty2) and then log in to the terminal using the user name of root and the password of LNXrocks!. Which prompt did you receive and why?
2. At the command prompt, type date and press Enter to view the current date and time. Now, type Date and press Enter. Why did you receive an error message? Can you tell which shell gave you the error message?
3. Switch to a different command-line terminal (tty5) by pressing CtrlþAltþF5 and log in to the terminal using the user name of user1 and the password of LNXrocks!. Which prompt did you receive and why?
4. At the command prompt, type who and press Enter to view the users logged in to the system. Who is logged in and on which terminal?
5. Switch back to the terminal tty2 by pressing CtrlþAltþF2. Did you need to log in? Are the outputs from the date and Date commands still visible?
6. Try typing in each command listed in Table 2-6 in order (pressing Enter after each) and observe the output. What did the last command (exit) do?
7. Switch to the terminal tty5 by pressing CtrlþAltþF5 and type exit to log out of your shell.
In: Computer Science
Write a program to ask three options to the user and continue until user selects option 3.
The first two options prompt a user to enter a string of numbers separated by spaces which is a 2by2 matrix. Do addition and subtraction on the input matrices when user selects 1 and 2.
You must write functions for matrix addition, subtraction and print. You may use the following function str_to_mlist to convert string to a list.
code example is given:
def str_to_mlist(m_str):
"""Converts a string separated by spaces to a list
Parameters
----------
m_str : str, required
Input string separated by spaces
Returns
-------
list
Numbers
"""
return m_str.split()
A sample run of the code looks like this:
Enter an option
1.Add two matrices
2.Subtract two matrices
3.Quit
1
Enter four numbers separated by spaces and press enter:3 4 -10
3
3 4
-10 3
Enter four numbers separated by spaces and press enter:8 9 0
-2
8 9
0 -2
Your result is:
11 13
-10 1
Enter an option
1.Add two matrices
2.Subtract two matrices
3.Quit
2
Enter four numbers separated by spaces and press enter:1 0 0
1
1 0
0 1
Enter four numbers separated by spaces and press enter:0 -1 -1
0
0 -1
-1 0
Your result is:
1 1
1 1
Enter an option
1.Add two matrices
2.Subtract two matrices
3.Quit
3
In: Computer Science
In 1995 , one county reported that among 3193 white women who had babies, 148 were multiple births. There were also 29 multiple births to 648 black women. Does this indicate any racial difference in the likelihood of multiple births? a) Test an appropriate hypothesis and state your conclusion. b) If your conclusion is incorrect, which type of error did you commit?
In: Statistics and Probability
| Year | Sales | Net Income After Tax |
|---|---|---|
| 1992 | $2,000,000 | $240,000 |
| 1993 | 2,750,000 | 338,000 |
| 1994 | 3,200,000 | 384,000 |
| 1995 | 5,000,000 | 575,000 |
| 1996 | 5,7000,000 | 600,000 |
| 1997 | 6,2000,000 | 713,000 |
| 1998 | 7,3000,000 | 803,000 |
| 1999 | 8,5000,000 | 860,000 |
| 2000 | 9,1000,000 | 900,000 |
| 2001 | 10,3000,000 | 912,720 |
What is the compound rate of growth for the firm's sales and net income after-tax?
In: Finance
The annual demand for liquor in a certain state is given by the following equation: QD = 500,000 – 20,000P
where P is the price per gallon and QD is the quantity of gallons demanded per year. The supply of liquor is given by the equation:
QS = 30,000P
a.) Solve for the equilibrium annual quantity and price of liquor. Suppose that a $1.00- per-gallon tax is levied on the price of liquor received by sellers. Use both graphic and algebraic techniques to show the impact of the tax on market equilibrium. b)Calculate the excess burden of the tax, the amount of revenues collected, and the incidence of the tax between buyers and sellers.In: Economics
The firm's production function is: q = K0,5 L0,5 and the total cost function is 10K + 10L = 10000 where q: output K: capital and L: labor
a. Calculate how many K and L are used for maximum production in 2 ways.
b. Draw the solution to the problem in graphic form with isoquant and isocost (TC) curves.
c. Draw it like No.2, add the following conditions in the same graph:
- if the price of L increases to 12
- if the price of L drops to 8
d. From the above problems, can you derive the labor demand function?
In: Economics
Your neighbor's 18 year old unmarried daughter has
just given birth to a baby boy. The neighbor is concerned that
neither she, nor her daughter, can take care of the baby. She asks
you what you can suggest that she do.
What is the Safe Haven law and can you tell her about
it?
In: Nursing
in the case study of "Radiation contamination caused by a transportation accident" Describe appropriate initial management of the driver and his assistant. Is the young boy who has not been located in danger? Explain. Are the other occupants of the houseboat at risk as a result of the accident? List at least four potential sources of radiation unrelated to the workplace to which the truck driver in the case study may be exposed.
In: Nursing