Examine the relationship between the equity market and the bond market. To this end, we have estimated the following regression ??? = ?0 + ?1???? + ?? where ??? and ???? denote the daily returns at time ? of an equity index and a bond index, respectively, while ?? is a random error term. The estimated coefficients are ?Ģ 0 = ā0.004 and ?Ģ 1 = ā0.256, with their standard errors being ??(?Ģ 0) = 0.007 and ??(?Ģ 1) = 0.014. The sample size is ? = 1,000.
In: Statistics and Probability
Question 1:
Write a program to receive a string from the user and compares the first and second half of the word and prints āFirst and Second Half Sameā or āFirst and Second Half Differentā. If the length of the word is odd, ignore the middle letter.
For example:
Run 1:
Enter a word: abcdabc
First and Second Half Same
Run 2:
Enter a word: abcde
First and Second Half Different
Hint: use the Math.floor() and length() to get the halves of the string and use the equals() to perform the similarity check inside if-else statement.
**********************************************************************************
Question 2:
Write a program that reads three different integers from the users and prints āall the sameā if they are all equal, āall differentā, if three numbers are different and āneitherā for all other cases.
For example:
Enter first number: 3
Enter first number: 2
Enter first number: 6
All Different.
**********************************************************************************
Question 3:
Write a program that reads three different floating point numbers from the users and prints the largest of those three:
For example:
First number: 2.36
Second number: 2.99
Third number: 2.78
Largest: 2.99
In: Computer Science
This problem is about the java programming and contain two parts
First part:
a word that reads the same forward and backward is called a
palindrome, e.g., "mom", "dad", "racecar", "madam", and "Radar"
(case-insensitive). Write a program called TestPalindrome, that
asks the user for a word and prints whether the word is a
palindrome or not.
Hint: for a string called inStr, you can use inStr. toLowerCase()
which returns a new string which is all in lower case letters. Use
two indexes forwardIndex and backwardIndex to scan the string
forward and backward at the same time.
Give the code of the first part.
The second part is :
copy-paste the TestPalindrome program,Then modify the program to
check a whole sentence (not just one word) to see whether it is a
palindrome or not. Punctuation, spaces, and capitalization must be
ignored.
Here are examples of palindromic sentences:
ā¢Madam, I'm Adam
ā¢A man, a plan, a canal - Panama!
Hint: to read a whole sentence, create a Scanner object called
input and then use input.nextLine(). For a character variable
called c, you can use Character.isLetter(c) to compute a boolean
result indicating whether the character is a letter or not.
The
In: Computer Science
Background: introduction to "Wrapper" classes, this is a tool or concept provided in the Java Programming Language that gives us a way to utilize native datatypes as Objects with attributes and methods. A Wrapper class in Java is the type of class which contains or the primitive data types. When a wrapper class is created a new field is created and in that field, we store the primitive data types. It also provides the mechanism to covert primitive into object and object into primitive.Working with collections, we use generally generic ArrayList<Integer> instead of this ArrayList<int>. An integer is wrapper class of int primitive type. We use a Java wrapper class because for generics we need objects, not the primitives."
Problem: Create a Word Counter application, submit WordCounter.java.
Word Counter takes input of a text file name (have a sample file in the same directory as your Word Counter application to we don't have to fully path the file). The output of our Word Counter application is to echo the file name and the number of words contained within the file.
Sample File: Hello.txt:
hello
hello
hello
hello
hello
hello
hello
hello
hello
hello
In: Computer Science
In Python3 please do the following:
Program MUST take USER INPUT. The examples below are just test cases for you to test the program.
You are given a rare document that we suspect is written in an alien language. The alien language has the following grammar.
All its words read the same backward as well as forward. E.g. aba. A sequence of these words are written as sentences.
It is composed of only English alphanumeric([a-z, A-Z, 0-9]) characters in it.
It has exactly one space between each word.
It is case insensitive. i.e. aba is the same word as abA.
Write a function isAlienWord that takes an input word and returns if it is alien or not. Then, write another function called isAlienLanguage that calls the isAlienWord function for each word of its sentence and returns if the entire document is alien or not. For the document to be alien each and every single word in the document has to alien. True of type bool indicates the document is alien False means otherwise.
Have a main function from which the answer to questions are retrieved and run the program as a whole.
Examples:
Test Case 1:
input: document = āa maā output: False
Explanation: Though the string āamaā is a valid alien language āa maā is not.
Test Case 2:
input: document = āaba mom roor tet jasttsaj pillipā
output: True
Explanation: All the words in the document are alien. Hence, the
language is alien. Return true.
Note: The function isAlienWord must be implemented recursively. Failure to do so will fetch 0 points for this question.
In: Computer Science
5) Elder abuse has been a recurring issue and area of concern amongst the elderly.
5.1) Define elder abuse and the possible different forms of elder abuse you may come across in your nursing career (in 50-70 words)
Minimum word required : 50Please enter atleast 50 words
5.2) Identify the legal requirements and possible ethical issues in aged care practice in regards to elder abuse (in 40-60 words)
Minimum word required : 40Please enter atleast 40 words
5.3) List 4 (four) possible signs of elder abuse.
6) Multiple Diagnosis :
6.1) Determine the meaning of Multiple Diagnosis (in 20-40 words)
Minimum word required : 20Please enter atleast 20 words
6.2) Discuss the various problems from a nursing perspective that can arise whilst caring for a patient of Multiple Diagnosis (in 50-70 words).
Minimum word required : 50Please enter atleast 50 words
7) Analyse possible non-pharmacological therapies used in the possible treatment of dementia patients (in 50-70 words).
Minimum word required : 50Please enter atleast 50 words
8) Outline the normal ageing process and describe the following theories proposed to explain the ageing process (in 40-60 words each).
8.1) Normal ageing process:
8.2) Theories:
Biological theories
8.3) Psychosocial theory
8.4) Disengagement theory
8.5) Social exchange theory
8.6) Wear and tear theory
8.7) Activity theory
In: Nursing
In objective-C
Task: Write a program whose input is a character and a string, and whose output indicates the number of times the character appears in the string. The output should include the input character and use the plural form, n's, if the number of times the characters appears is not exactly 1.You may assume that the string does not contain spaces and will always contain less than 50 characters. Ex: If the input is: n Monday the output is: 1 n Ex: If the input is: z TodayisMonday the output is: 0 z's Ex: If the input is: n It'ssunnytoday the output is: 2 n's Case matters. Ex: If the input is: n Nobody the output is: 0 n's n is different from N.
#include <stdio.h>
#include <string.h>
int main(void) {
char letter;
char word[50];
printf("Enter the letter to be checked: ");
scanf("%c", &letter);
scanf("%s", word);
int numChars = 0;
for (int i = 0; i <= strlen(word); i++)
if (word[i] == letter)
{
numChars++;
printf("%d %c's", numChars, letter);
}
else
{
printf("%c is different from %c\n", letter, word[i]);
}
return 0;
}
Enter the letter to be checked: n
Mondayīŗ§
n is different from M
n is different from o
1 n'sn is different from d
n is different from a
n is different from y
n is different from
I created this program, but cannot get the right output. Can someone suggest how to improve it?
In: Computer Science
Hello,
***We have to print the second list backward while interleaved with the first list in normal order.***
its PYTHON language.
Please refer the below example. Bold are the inputs that the user enters. In here the user input words and much as he wants and when he enter STOP, it stops and he is asked to enter more words.(second words count equals to the word count he inputs in the first phase)
Enter words, STOP to stop. Ok
Enter words, STOP to stop. we're
Enter words, STOP to stop. this
Enter words, STOP to stop. STOP
Ok. Now enter 3 other words.
Word 0: again?
Word 1: doing
Word 2: wait
Now I will magically weave them more weirdly!
Ok
wait
we're
doing
this
again?
PS : I have done it actually but the I have a problem getting the last output.(how to merge the 2 lists.) It only prints the words in input order.
MY CODE :
firstlist = []
c=0
stop = False
while not stop:
a = input("Enter words, STOP to stop. : ")
if a == "STOP":
stop = True
else:
c+=1
firstlist.append(a)
print("Okay. Now enter other " + str(c) +" numbers!")
for i in range(c):
v = input('Enter word ' + str(i+1) + ': ' )
firstlist.append(v)
print("I'm going to magically weave the words!!")
for x in firstlist:
print(x)
Please help.
In: Computer Science
1)which are correct of these statements .
Group of answer choices:
a)If a security is underpriced, then the expected holding period return is above the market capitalization rate.
b)The value of the equity equals the present value of all future payouts (dividends plus repurchases).
c)The value of a share equals the present value of all future dividends per share.
d)If a firm reinvests its earnings at an ROE equal to the market capitalization rate, then its earnings-price (E/P) ratio is equal to the market capitalization rate.
e)The value of a share equals the present value of earnings per share assuming the firm does not grow, plus the NPV of all future investments.
2)which are correct of these statements.
Group of answer choices
a)Everything else equal, the higher the expected dividend growth rate, the higher the P/E ratio.
b)Everything else equal, the higher the plowback ratio, the lower the P/E ratio.
c)Everything else equal, the higher the plowback ratio, the higher the P/E ratio.
d)Everything else equal, the higher the risk of the stock, the lower the P/E ratio.
e)Everything else equal, the higher the risk of the stock, the higher the P/E ratio.
3)Match the stock valuation model from the left column with the cash flows used in that model from the right column.
Group of answer choices
Total Payout Model
word box: Dividends per share Free Cash Flow to the Firm Dividends plus buybacks
Dividend Discount Model
word box: Dividends per share Free Cash Flow to the Firm Dividends plus buybacks
DCF Model
word box: Dividends per share Free Cash Flow to the Firm Dividends plus buybacks
4)
Match the stock valuation model from the discount rate used in that model from the word bank.
Group of answer choices
Total Payout Model
word box: equity cost of capital weighted-average cost of capital
Dividend Discount Model
word box: equity cost of capital weighted-average cost of capital
DCF Model
word box: equity cost of capital weighted-average cost of capital
In: Accounting
Write the following methods in java class ARM that represent state information as well as functional blocks of the ARM platform.
[Go through the following 5 classes then write methods for the instructions: mov, str, ldr, add in class ARM, finally, write a print method for ARM in Main.java that can display the registers and the memory locations that have been used. (make sure to make a visualization of the print method instead of just a console dump)] --- Please don't copy the answer from another question here on chegg. Thank you so much in advance.
--As an example the following store signature is provided:
public void str(int Rd, int Rn, int o, boolean pre, boolean mod_pre)
STR r0,[r1,#10] is the pre address store which would look like:
str(0,1,10,true)
STR r0,[r1,#10]! is a pre address store with an update which would look like:
str(0,1,10,true,true)
------------------------------------------------------------------------------------------------------------------------------------------
public class ARM {
private RegisterBank rb;
private RAM mb;
public ARM(int size_reg, int bits_reg, int size_ram, int bytes_ram){
rb = new RegisterBank(size_reg,bits_reg);
mb = new RAM(size_ram,bytes_ram);
}
public void mov(int Rd, int Rn, int bitshift){
//TO DO
}
public void str(int Rd, int Rn, int o, boolean pre, boolean mod_pre){
//TO DO
}
public void ldr(int Rd, int Rn, int o, boolean pre, boolean mod_pre){
//TO DO
}
public void add(int Rd, int Rn, int Rc){
//TO DO
}
public void print(){
//TO DO
}
}
public class Main {
public static void main(String[] args) {
/* (1) write a short program using the java ARM class that is like this C++ code:
int x = 13;
int y = 14;
int z = 16;
z = x+y+z;
Note: assume 32bit ARM and RAM should have 4 byte alignments (4*bytes)
(2) call the print method periodically to check your work or use the debugger
*/
}
}
public class RAM {
private int[] rs;
public RAM(int size, int bytes){
rs = new int[size*8*bytes];
}
public Word get(int bytes, int a){
int bits = 8*bytes;
int[] r = new int[bits];
for(int i = 0; i < bits; i++){
r[i] = rs[a+i];
}
Word w = new Word(bits);
w.set(r);
return w;
}
public void set(Word w, int a){
int[] r = w.get();
for(int i = 0; i < r.length; i++){
rs[a+i] = r[i];
}
}
}
import java.util.ArrayList;
public class RegisterBank {
private ArrayList rs;
public RegisterBank(int size, int bits){
rs = new ArrayList();
for(int i = 0; i < size; i++){
rs.add(new Word(bits));
}
}
public Word get(int index){
int[] i = rs.get(index).get();
Word r = new Word(i.length);
r.set(i);
return r;
}
public void set(int index, Word r){
rs.get(index).set(r.get());
}
}
public class Word {
private int[] bs;
public int bits;
public Word(int bits){
bs = new int[bits];
this.bits = bits;
}
public int[] get(){
int[] r = new int[this.bs.length];
for(int i = 0; i < this.bs.length; i++){
r[i] = this.bs[i];
}
return r;
}
public void set(int[] r){
for(int i = 0; i < r.length; i++){
this.bs[i] = r[i];
}
}
}
In: Computer Science