Many types of identification numbers, including credit card
numbers, must satisfy the Luhn Algorithm in order to be
considered "valid". This algorithm verifies the number by
performing the following operation: starting from the right-most
digit, double every 2nd digit. If this doubling causes
that digit to be greater than 9, subtract 9 from it. Now add up all
the new digits of the number (including the digits that weren't
doubled). If the sum is evenly divisible by 10, then the number is
valid, otherwise it is not. For example, for the number 2395129857
this would be:
2 3 9 5 1 2 9 8 5 7
2x2 3 9x2 5 1x2 2 9x2 8 5x2 7 (doubling every 2nd digit from
right)
4 3 18 5 2 2 18 8 10 7
4 3 9 5 2 2 9 8 1 7 (subtract 9 from any digit greater than
9)
4 + 3 + 9 + 5 + 2 + 2 + 9 + 8 + 1 + 7 = 50
Since 50 is divisible by 10, this number satisfies the
Luhn criteria, and is therefore valid.
a) Write a C function called check_luhn that takes a single integer as input, and returns 1 if the number is valid according to the Luhn algorithm, or 0 if not. HINT: Start from the right-most digit, and use simple C operators to find both the digit and the remaining number once that digit is removed. Then process that number if necessary and add it to the sum.
b) Using the function written in part (a), write a C program to print all of the "valid" numbers between 10000000 and 99999999
c) Please provide a short description (in bullet points) of an explanation of how the program works
In: Computer Science
Complete the following journal entries for PAT Company.
1. An assembly machine was purchased for $500,000, shipping cost was $10,000, and the company incurred $5,000 installation cost and $3,000 in testing cost. The company took out a $450,000 15 year 8 percent note payable and paid the balance in cash.
2. PAT Company paid $7,500 in routine maintenance costs.
3. Improvements of $10,000 were paid on an old machine which extended its useful flie.
4. Monthly depreciation of $8000 was recorded.
5. The monthly depreciation of a $100,000 asset with a salvage value of $4,000 at the end of its useful life of 8 years was recorded. The company uses a straight line method of depreciation.
6. The monthly depreciation of a $60,000 asset with a salvage value of $6,000 at the end of its useful life of 12,000 hours of production was recorded. The production for this month was 50 hours. The company uses a unit of production method of depreciation.
7. An old machine with an original cost of $30,000, accumulated depreciation of $20,000, residual value of $3,000 and market value of $7,000 was sold for $6,000 in cash.
PLEASE TYPE LAST RESPONSE WASNT LEGIBLE
In: Accounting
1. A shipping company offers various sized shipping boxes to its
customers. Some of these boxes are cube-shaped, with equal height,
width, and depth. As part of an upcoming sales promotion, the
company will offer two cube-shaped boxes for the price of
one.
a. Write an expression to represent the total volume of two
different sized boxes as a sum of cubes if one of the boxes has
sides with a length of 1 foot and the other has sides with a length
of x feet.
b. Factor the sum of cubes.
c. Calculate the total volume of the two boxes if x = 3 feet.
2. A toy manufacturer is preparing to manufacture a puzzle cube in
two different sizes. One of the puzzle cubes will have a side
length of 4 centimeters, and the size of the other is yet to be
determined.
a. Write an expression to represent the total volume of two
different sized puzzle cubes as a sum of cubes, using m centimeters
as the side lengths of the second puzzle.
b. Factor the sum of cubes.
c. Calculate the total volume of the two puzzle cubes if m = 5
centimeters.
3. A pet supply store is planning to offer cube-shaped fish tanks.
The store manager decides to order one tank with a 12-inch side
length but has not yet decided on the size of the other.
a. Write an expression to represent the total volume of two
different sized tanks as a sum of cubes, using 2t centimeters as
the length of the sides in the second tank.
b. Factor the sum of cubes.
c. Calculate the total volume of the two fish tanks if t = 7
inches.
4. Think of another real-world situation involving two different
sized cube-shaped items.
a. Write a sentence to describe what the cubes represent and then
write an expression to represent the total volume of the two items
as a sum of cubes, using 2a to represent the side lengths in one
cube and 3b to represent the side lengths in the other cube.
b. Factor the sum of cubes.
c. Choose two different values for a and b and use these values to
calculate a specific total volume for the two items.
In: Math
Zoe is testing to see if UCI students are more stressed out than
the normal
person is. The mean stress level of the average person is 50 with a
known
standard deviation of 10. Amy is going a two-tailed test with α =
.10. The null
hypothesis is μ = 50. What precisely is μ the mean of?
The average UCI student commutes 6.3 miles to school, with a
known standard
deviation of five miles. Amy believes that social science majors
are different from
the average UCI student. She gets a sample of six social science
majors and
asks them how far they commute. They answer 4, 13, 11, 7, 15, 10.
Do a z-test
to see if Amy’s belief is true. Please calculate the z-statistic
for this data.
Now, for the above question, state the critical value, and come
to a conclusion
about Amy’s belief. Let α = .01. Make it a two-tailed test.
What is the p-value for the experiment in questions 13 and 14?
Answer to
four digits past the decimal point, such as .3264.
In: Statistics and Probability
2) (10 point question) Many people love colorful and tasty tomatoes and an ambitious student in horticulture wants to breed such a tomato variety. He searched all the available tomato genetic resources, and found the two inbred lines he needed. One line produces the tomatoes with a colorful red-green-yellow mosaic pattern (rrTT), and the other strain is 'very tasty' (RRtt).
When the student crossed the two strains together, he made the following observations:
In the F1 generation, all the ripe tomatoes have a regular red color and a regular flavor. The student tasted tomatoes from over 40 individual plants, and was sick with regular tasting tomatoes.
In the F2 progeny, the student sampled 1000 tomato plants: 498 had red-color tomatoes with normal taste, 248 colorful tomatoes with normal taste, and 254 red-color tomatoes with great taste. He was disappointed not to find any colorful tomatoes with great taste. He then sampled another 2000 F2 plants: 998 had red-color tomatoes with normal taste, 511 colorful tomatoes with normal taste, 488 red-color tomatoes with great taste, and 3 colorful tomatoes with great taste; he was so happy to find what he wanted!!!
Based on these experimental results, he realized that the alleles he needs are recessive and the two genes are linked.
A) (4 points) How closely linked are the r and t genes? Please explain your strategy to calculate the distance.
B) (2 points) A testcross with the F1 can be used to further define the genetic distance between the two genes. Indicate the ratio of progeny phenotypes that you'd expect (describe phenotypes) from this cross based on the map distance you propose for part a).
C) (2 points) The tomato genome has now been sequenced and genes on the chromosome are in the following order OPQRSTU. The respective physical distances on the chromosome between these seven genes are very similar. But we now know that there is a 'cold spot' between genes RT and 'hot spots' between PQ and TU. Draw a representation of the genetic map relative to the physical map (both maps are needed here) for this part of the tomato genome. Show the relative (approximate) locations of the genes on the two maps.
D) (2 points) What can you predict about the chromosome chromatin structure between the R and T genes?
In: Biology
A 67-year-old man presents to your office with worsening cough,
sputum production, and shortness of
breath. He is a smoker for the past 50 years. He is known to have
Chronic Obstructive Pulmonary
Diseases (COPD). He was in his usual state of health until one week
ago until he got a common cold and
since then he has a hacking cough and increased sputum production.
this is all information I have
1. What are the two major clinical disorders/diseases are
classified as Chronic Obstructive
Pulmonary -Diseases? How do they differ?
2. Which one of the two syndromes above is more predominant in
this patient? What is the
predisposing factors for the syndrome from the scenario?
3. Asthma is considered one of the obstructive disease of
pulmonary diseases, explain the
the pathological mechanism that is responsible for asthma that
causes the asthma attack.
In: Nursing
In: Nursing
It is observed that 56.00 mL of water at 20∘C completely fills a container to the brim. When the container and the water are heated to 60∘C, 0.35 g of water is lost.
Part A
What is the coefficient of volume expansion of the container? Density of water at 60 ∘C is 0.98324 g/mL.
Express your answer using two significant figures.
Part B
What is the most likely material of the container?
| copper |
| aluminum |
| glass |
| iron |
In: Physics
You are considering a project that offers up the following possible payout with an opportunity cost of 20%.
Time 0 1 2
Base Case -$60,000 10,000 10,000
At the end of year two you know there is a 10% possiblity you will buy out your competitor which has the potential to create opportunities that are worth $1,028,231 at that time. How much potential value is created or lost by taking on this project (i.e. what is the NPV)?
In: Accounting
Two equal mass object experience a totally inelastic elastic collision. Mass 1 has an initial velocity of 10 m/s in the negative y-direction. Mass 2 has an initial velocity of 10 m/s in the positive x-direction. The collision occurs at the origin. What is the magnitude and direction of the velocity of the combined mass? What is the kinetic energy conserved in the collision? If not what fraction of kinetic energy was lost?
In: Physics