In Python
Which initial value of x will make the following piece of code
leave a 9 in the final value of x?
x = ____?
if x < 7:
x = x + 1
x = x + 2
| a. |
11 |
|
| b. |
9 |
|
| c. |
7 |
|
| d. |
None of the above |
Which initial value of x will make the following piece of code
leave a 20 in the final value of x?
x = ____?
if x * 2 <= 34:
x = 0
else:
x = x + 1
x = x + 1
| a. |
17 |
|
| b. |
18 |
|
| c. |
19 |
|
| d. |
20 |
|
| e. |
None of the above |
What is a common word for the textual representation of a program?
| a. |
code |
|
| b. |
prompt |
|
| c. |
interpreter |
|
| d. |
expression |
|
| e. |
None of the above |
Which statement reads a user-entered string into variable user_name?
| a. |
input = user_name() |
|
| b. |
user_name = input() |
|
| c. |
input() => user_name |
|
| d. |
user_name = "input()" |
|
| e. |
None of the above |
What is the output?
count = 0
while count < 3:
print('loop')
count = count + 1
print('final value of count:', count)
| a. |
Prints 'loop' once, then 'final value of count: 1' |
|
| b. |
Prints 'loop' three times, then 'final value of count: 3' |
|
| c. |
Prints 'loop' three times, then 'final value of count: 4' |
|
| d. |
Prints 'loop' forever (infinite loop) |
|
| e. |
None of the above |
In: Computer Science
home / study / social sciences / psychology / psychology questions and answers / find this article: full-text: article measuring ethics: when tensions rise, police officers ...
Your question has been answered
Let us know if you got a helpful answer. Rate this answer
Question: Find this article: Full-text: Article Measuring ethics: when tensions rise, police officers who l...
Find this article: Full-text: Article Measuring ethics: when tensions rise, police officers who learn and live their ethics will continue to set the pace….by Tim Pardue. Found in Law Enforcement Technology, 42.5 (May 2015) p6. Word Count: 821.
Read the article, and in the discussion forum, respond to the following questions. Remember to be persuasive use facts and logic in your response. Identify the sources of information that you use, and try to dig deeper into the issue than simply drawing general conclusions from specific incidents.
What does the article and its source have to say about the way the public views the ethics of police officers as compared to the other professions listed?
Do you think that the news media is responsible for creating a disproportionately negative view of police officers?
Why do you think that people seem to more willing to publicly protest the actions of police officers but not the actions of those who they view, according to the survey that was done, as being significantly less ethical?
In: Psychology
Kenny is planning for retirement in 20 years. Currently, he has
$300,000 in a savings account
and $600,000 in a mutual fund. Moreover, he plans to add to his
savings by depositing $3,000
per month in his savings account at the beginning of each month for
the next twenty years
until retirement. The savings account will return 5% APR compounded
monthly and the
investment in the mutual fund will return 8% compounded
annually.
(a) How much money will Kenny have at retirement 20 years later?
(b)Kenny expects to live for 20 years after he retires and at
retirement he will
deposit all of his savings in a bank account paying 2% APR
compounded
monthly. If he wants to withdraw an equal sum of money at the end
of
each month from the bank account for financing his daily expenses
after
retirement, how much can he withdraw each time?
(c)If the yield to maturity of a bond is higher than its coupon
rate, the par
value of the bond should be higher than its price, resulting in a
discount
bond. Conversely, if the yield to maturity of a bond is lower than
its
coupon rate, the par value of the bond should be lower than its
price,
resulting in a premium bond. Critically discuss this phenomenon.
(word
limit: 150 words)
In: Finance
ROST Corporation is a manufacturer of a variety of kitchen
utensils. In order to improve the
quality of existing products, the production manager of the company
proposes to replace a
machine used in the molding process. As a financial manager of the
company, you are
responsible for assessing the feasibility of this project. After a
preliminary study, it is
estimated that the new project will generate additional sales
revenue of $310,200 in each of
the next four years. It is known that the company faces a marginal
tax of 26% and wants a
17% required rate of return. In addition, the company employs the
straight-line method to
compute its depreciation. To finance the project, the company would
have to borrow
$1,200,000 at 10% interest from its bank. Other findings of the
study are presented as
follows:
Old Machine New Machine
Initial purchase price $1,120,000 $960,000
Tax life 20 years 4 years
Age 16 years 0 years
Expected salvage value $0 $0
Current market value $224,000 N.A.
Annual cash expense $360,000 $380,000
(a)
(b)
(c)
Determine the annual after-tax cash flows associated with this
project.
Determine whether you would accept or reject the project if the net
present
value rule is used.
Without doing any calculation, how would you reply to your boss if
he told you
to evaluate this project by the internal rate of return rule rather
than the net
present value rule? (word limit: 150 words)
In: Finance
I am trying to create a basic shell program in C that runs 10 commands and then quits. Only one word commands are required, like:
cal, date, ls, ps, pwd, who, quit
The part I am struggling with is passing the scanned command into my array in the child process to be executed using execvp().
Here is my code:
#include <stdio.h>
#include <string.h>
#include<stdlib.h>
#include<unistd.h>
#include<sys/types.h>
#include<sys/wait.h>
#include<readline/readline.h>
#include<readline/history.h>
#define MAX_CMD_NUMBER 10
int main()
{
int i;
char command[10];
for (i=0; i< 10; i++)
{
printf("COMMAND-> ");
fflush(stdout);
scanf("%s", command); // takes in
the user's single-string command
if (strcmp(command, "quit") ==
0)
i =
MAX_CMD_NUMBER; // terminate the loop
else
printf("Command
#%d is: %s\n", i, command);
}
printf("hello world (pid:%d)\n", (int) getpid());
int rc = fork();
if (rc < 0) {
// fork failed;
exit
fprintf(stderr, "fork
failed\n");
exit(1);
}
else if (rc == 0)
{
char *command[2];
command[0] =
strdup(command);
command[1] =
NULL;
execvp(command[0],
command);
printf("this shouldn't
print out");
}
else
{
command =
wait(NULL);
}
return 0;
}
In: Computer Science
Please paraphrase this paragraph into a short summary..
Good philosophical thinking takes time. Progress in good critical thinking is often very slow. The process of critical thinking can’t be called successful if it efficiently maximizes its inputs and outputs in the shortest measure of time: We do not produce thoughts in the mind like widgets in a factory. The reason for this is because good critical think- ing often needs to uncover that which subtle, hard to discern at first, and easy to overlook. I define subtlety as ‘a small difference or a delicate detail which takes on greater importance the more it is contemplated.’ As a demonstration, think of how many ways you can utter the word ‘Yes’, and mean something different every time. This also underlines the importance of precision, as a good thinking habit. As another example: Think of how the colour planes in a painting by Piet Mondrian, such as his ‘Composition with Yellow, Blue, and Red’ have squares of white framed by black lines, but none of the white squares are exactly the same shade of white. You won’t notice this if you look at the painting for only a few seconds, or if you view a photo of the painting on your computer screen, and your monitor’s resolution isn’t precise enough to render the subtle differences. But it is the job of reason to uncover those subtleties and lay them out to be examined directly. And the search for those subtleties cannot be rushed.
In: Psychology
Pam Alvarez and Shawna Jones are senior vice-presidents of Mutual of Whitewater. They are co-directors of the company’s pension fund management division, with Alvarez having responsibility for fixed income securities (primarily bonds) and Jones being responsible for equity investments. A major new client, the Southwestern Municipal Alliance, has request that Mutual of Whitewater present an investment seminar to the mayors of the represented cities, and Alvarez and Jones, who will make the actual presentation, have asked you to help them.
To illustrate the common stock valuation process, Alvarez and Jones have asked you to analyze the Temp Que Company, an employment agency that supplies word processor operators and computer programmers to businesses with temporarily heavy workloads. Stocks of companies with similar risk as Temp Que are currently yielding 13%. You are to answer the following questions (Show calculations clearly).
1) Suppose Temp Que is expected to experience zero growth during the first 3 years and then to resume its steady-state growth of 6 percent in the fourth year. What is the stock’s value now?
2) Why do stock prices change? Answer the question by using the following example: Suppose the expected D1 is $2, the growth rate is 5 percent, and R is 10 percent. Using the constant growth model, what is the price? What is the impact on stock price if g is 4 percent or 6 percent? If R is 9 percent or 11 percent?
In: Finance
The purpose of this assignment is to analyze data and use it to provide stakeholders with potential answers to a previously identified business problem.
For this assignment, continue to assume the role of a data analyst at Adventure Works Cycling Company. Evaluate the data associated with the drop in sales for the popular model "LL Road Frame-Black 60." Provide a hypothesis on what could be contributing to the falling sales identified in the initial business problem presented by your manager.
In 250-500 words, share these recommendations in a Word document that addresses the following.
In: Computer Science
Porsche is expected to sell approximately 60,000 cars in the U.S. in 2019. I'll let you estimate an average selling price across Porsche models. For this example, let's assume that all the sales happen in December of 2019. Also, assume that Porsche has fully hedges their U.S. dollar exposure (based on predicted sales) using futures or forward contracts at a rate of $1.10 per Euro. What happens in the following situations:
a. the Dollar/Euro exchange rate remains unchanged and sales are as predicted
b. the Euro rises against the Dollar and the exchange rate moves to $1.00 per Euro. Sales are as predicted.
c. the Euro falls against the Dollar and the exchange rate moves to $1.25 per Euro. Sales are as predicted.
d. the Euro rises against the Dollar and the exchange rate moves to $1.00 per Euro. Sales are 20% higher than expected.
e. the Euro rises against the Dollar and the exchange rate moves to $1.00 per Euro. Sales are 20% lower than expected.
Be specific in your answers. Where does Porsche lose money, and how much? Where does Porsche make money and how much? What is the overall effect on Porsche's income in their home currency? FYI, you can make the Euro currency symbol in Word by using CRTL + ALT + E.
In: Finance
Scenario: Your organization has used a variety of collaboration systems developed by some project managers. Some of these systems were successful while others were not. Your organization has one unique challenge—many of your employees are staffed at other locations or work from home (telework). You would like to standardize the collaboration process to improve team communication for all company projects. In your presentation, you should include the elements listed below.
Explain why collaboration information systems (IS) are important from the organization’s perspective.
Discuss how collaboration tools can improve team communication.
Identify three tools that will be used for synchronous communications and three tools that will be used for asynchronous communications. Be sure to explain why you made these choices.
Describe how project files, such as Microsoft (MS) Word, MS Excel, MS Project, and MS Visio, will be shared with team members. Be sure to explain the rationale behind your choice.
Explain how the task list for managing tasks will be shared with team members. Be sure to explain the rationale behind your choice.
Discuss how this new collaboration IS could provide competitive advantages for your organization.
Your presentation should be a minimum of six slides in length (not counting the title and reference slides). Use of images, graphics, and diagrams is encouraged. You can use an industry of your choosing or examples from your personal or professional experiences in developing this assignment.
In: Operations Management