Pass or Fail (C++)
Given a vector, where each element in the vector is a [name, grade] pair sort range by name, partition range into pass and fail, preserving alphabetical order within partition. The grades are the number of points earned (600 points earns a passing grade).
std::vector<std::pair<std::string, int>> v {
{"josh", 851},
{"mark", 600},
{"charles", 412},
{"sebnem", 1000},
{"abdol", 905},
{"imen", 300}
};
--------EXPECTED
OUTPUT-------------------------------------------------
std::vector<std::pair<std::string, int>> w {
{"abdol", 905},
{"josh", 851},
{"mark", 600},
{"sebnem", 1000}, // Everyone after this point failed
{"charles", 412},
{"imen", 300}
};
Note: NO LOOPS ALLOWED
Thanks!
In: Computer Science
Define and provide examples of the following terms
(a) aromatic (b) hydrophilic (c) combustion
(d) methylene group (e) methyl group (f) common name
(g) IUPAC name (h) conformations (i) Newman projection
(j) eclipsed (k) staggered (l) gauche conformation
(m) anti conformation (n) catalytic cracking (o) cis-trans isomers of a ring
(p) chair conformation (q) boat conformation (r) distorted boat
(s) half chair conformation (t) axial position (u) equatorial position
(v) chair-chair interconversion (w) fused ring system (x) bridged bicyclic compound
(y) bridgehead carbon atoms
In: Chemistry
lamda1 = 3.7 uC/cm
pic for#1
1) A cylinder of radius a = 6.4 cm and height h = 11.9 cm is aligned with its axis along the y-axis as shown. What is the total flux ? that passes through the cylindrical surface? Enter a positive number if the net flux leaves the cylinder and a negative number if the net flux enters the cylnder.
pic for #2
2)Another infinite line of charge with charge density ?2 = -11.1 ?C/cm parallel to the y-axis is now added at x = 3.05 cm as shown.
What is the new value for Ex(P), the x-component of the electric field at point P?
3)What is the total flux ? that now passes through the cylindrical surface? Enter a positive number if the net flux leaves the cylinder and a negative number if the net flux enters the cylnder.
pic for #4
4)The initial infinite line of charge is now moved so that it is parallel to the y-axis at x = -3.05cm.
What is the new value for Ex(P), the x-component of the electric field at point P?
5)What is the total flux ? that now passes through the cylindrical surface? Enter a positive number if the net flux leaves the cylinder and a negative number if the net flux enters the cylnder.
In: Physics
1. Diluc is a 21-year-old man that is a student at UC Davis who rushes to the Student Health Center in the morning after a restless night of itching. When he is admitted and reports his symptoms to the physician, he explains that he has had intense localized itching on his arms for the past 24 hours and is unsure of the cause. The physician asks Diluc questions about his activities in the last 24 hours, and the physician takes note of the fact that Diluc engaged in unprotected sexual activities the day before. When examining the area that Diluc has been scratching, the physician notices some elevated serpentine lines. Diluc has repeatedly told the physician that the intense scratching occurred spontaneously and he has no history of eczema or other rash like infections.
2. Julie brings her five-year old daughter. When the nurse asked what brings them in, Julie replied saying her daughter's been having chills and fever for the past week. The doctor asked if she had any other signs/symptoms, Julie let them know her daughter had some unusual joint pains, fatigue, and vomiting. Julie also mentioned they had travelled to abroad 2-3 weeks ago during the kids summer break. Julie, her husband, and daughter went to Mexico for a week, but no one else in the family has any symptoms. They didn't get any shots before traveling out of the country or neither did they take any medicine with them when they went as well.
Instruction:
In: Nursing
At UC San Diego, incoming students are each randomly assigned to
join one of the six colleges: Revelle, Muir, Marshall, Warren,
Roosevelt, and Sixth. Suppose there are 24 incoming students,
including Winona, Xanthippe, and Zelda. It cannot be assumed that
all colleges will be assigned four students; since each student’s
assignment is random, some colleges may be assigned more students
than others.
Please leave your answers as unsimplified expressions with
factorials, exponents, permutations, combinations, etc.
a) All 24 incoming students get called up one at a time to be
assigned to a college. How many possible orders of all 24 students
have Winona as the first student called?
b) How many possible orders of all 24 students have Zelda,
Xanthippe, and Winona (in any order) as the first three students
called up to wear the sorting hat?
c) How many ways are there to assign all 24 students to colleges
such that Zelda, Xanthippe, and Winona all get assigned to Muir?
Here, and in what follows, the order in which the students are
assigned does not matter.
d) How many ways are there to assign all 24 students to colleges
such that Zelda, Xanthippe, and Winona all get assigned to the same
college?
e) How many ways are there to assign all 24 students to colleges
such that Zelda, Xanthippe, and Winona are assigned to different
colleges?
f) How many ways are there to assign all 24 students to colleges
such that exactly 4 students get assigned to Warren?
g) How many ways are there to assign all 24 students to colleges if
each of the six colleges has room for only four incoming
students?
h) How many ways are there to assign all 24 students to colleges if
nobody is assigned to the same colleges as the person called up
just before them?
i) What is the probability that Winona, Xanthippe, and Zelda are
all assigned to Muir?
j) Suppose again that the students are called up one at a time. In
how many possible orders of all 24
students does Zelda get called up some time before Xanthippe?
Simplify your answer as much as possible, but let factorials remain
unsimplified.
In: Statistics and Probability
You wonder whether green tea lowers cholesterol.
(a) To research the claim that green tea lowers LDL (so-called bad)
cholesterol, you ask a random sample of individuals to divulge
whether they are regular green tea users or not. You also obtain
their LDL cholesterol levels. Finally, you compare the LDL
cholesterol levels of the green tea drinkers to those of the
non-green tea drinkers. Explain why this is an observational
study.
(b) Name some lurking variables that might exist in the
study.
(c) Suppose, instead of surveying individuals regarding their
tea-drinking habits, you decide to conduct a designed experiment.
You identify 120 volunteers to participate in the study and decided
on three levels of the treatment: a placebo, one cup of green tea
daily, two cups of green tea daily. The experiment is to run for
one year. The response variable will be the change in LDL
cholesterol for each subject from the beginning of the study to the
end. What type of experimental design is this?
(d) Explain how you would use blinding in this experiment.
(e) What is the factor? Is it qualitative or quantitative?
(f) What factors might you attempt to control in this
experiment.
(g) Explain how to use randomization in this experiment. How does
randomization neutralize those variables that are not
controlled?
(h) Suppose you assigned 40 subjects to each of the three treatment
groups. In addition, you decided to control the variable exercise
by having each subject perform 150 minutes of cardiovascular
exercise each week by walking on a treadmill. However, the 40
subjects in the placebo group decided they did not want to walk on
the treadmill and skipped the weekly exercise. Explain how exercise
is now a confounding variable.
In: Statistics and Probability
There is a famous quote often attributed to Albert Einstein that says:
“No amount of experimentation can ever prove me right; a single experiment can prove me wrong.”
There is some dispute about whether Einstein ever said this, but it might reflect his sentiments as more accurately cited in the book Mathematical Problems in Elasticity (Remigio Russo 1996):
“At this time the anti-relativity clique in Germany […] published a book called 100 Authors Against Einstein. Einstein informed that press that if relativity was wrong they would only need one author.”
Each quote captures an important aspect of the Popperian hypothetico-deductive account of science: knowledge comes from experimental falsification of a hypothesis rather than from experimental confirmation of one.
QUESTION: Explain how an inductivist might respond to this claim regarding falsification and knowledge. Do you agree with this response? Explain and justify your answer. In doing so, consider to what extent inductivists and Popperians have mutually exclusive ideals of what makes science rational, or whether they are, in some way, complementary.
In: Physics
The next asset market that will have a bubble is the stock market.
Thanks, Chace. This is a really important point, as I suspect that many of you do not have a lot of market experience. The S&P 500 (aka "the stock market") dropped from about 3450 two 2200 or so in a matter of a couple of weeks (basically March 1-20), and has since staged a monster rebound.
I have some questions as it relates to bubbles and market timing:
1) What is a "V-bottom" in connection to stocks and What is a "dead-cat bounce" in the stock market, and why might the term have that name?
2) How does one tell in real-time whether they are witnessing a V-bottom or a dead-cat bounce? What does this insinuate about the risk of investing in stocks?
In: Economics
1. Explain the role of transparency and accountability within a benefits realization plan.
2. In your own words, how do you distinguish between the neutral zone and the new beginning that Bridges discusses in your readings?
3. CMH shares a leadership value ladder which includes tips for how to lead through change. If you were to add a third step in the ladder of leadership behaviors needed through change, what would it be? Explain your response.
In: Psychology
*****************************************************
* USE UBUNTU (Linux) TERMINAL MODE COMMANDS ONLY *
* DO NOT USE ANY EDITORS TO CREATE THIS PROGRAM *
*****************************************************
1) Create a file called lastNameFirstNameInitialpgm3.sh ex: robinsonMpgm1.sh
2) Append to the above file the necessary commands that when this file is executed
it will display the following:
- Using your own set of multi-line comments enter your program identification
as described in the Syllabus, example:
<<ID
**************************************************
Author : Your Name
Course : Course Name and Times
Professor: Michael Robinson
Program : Program Number, Purpose/Description
A brief description of the program
Due Date : mm/dd/yyyy
I certify that this work is my own alone.
**************************************************
ID
- Append to the file the following commands that when this file is executed it will do the following:
1) Display Hello my name is:
2) Display My user name is:
3) Display Todays date and time is:
4) Display This file has x lines
5) Display This file has x words
6) Display this file has x bytes
7) Display Please enter any number
8) Display Your number $number * 2 = XXX and display press any key to continue
9) Display a new clean screen
10) Display Enter a line of numbers to be added
11) Using enhanced for loop, display all numbers entered delaying the output
of each number by 1 second each and then the total of adding thoses numbers:
ex: 20 5 3 = 28
12) Using a while true loop request, accept and display data until it ends on
input mod 5 = 0
using -lt and -gt comparison commands
this uses if else
In: Computer Science