Reference no: EM131003002
Question 1.
Write a program that prompts the user for a positive integer greater than 1. The program should then output either "prime" if the given number is a prime or "composite" otherwise. Recall that an integer is prime if and only if its only divisors are 1 and itself.
Question 2.
- Your program should simulate a checkout counter. It should work like the following example:
<Program> Welcome to the checkout counter! How many items are you purchasing today?
<User> 3 (user presses Enter key)
<Program> Please enter the name of product 1:
<User> chicken (user presses Enter key)
<Program> And how much does chicken cost?
<User> 3.50 (user presses Enter key)
<Program> Please enter the name of product 2:
<User> chips (user presses Enter key)
<Program> And how much does chips cost?
<User> 1.25 (user presses Enter key)
<Program> Please enter the name of product 3:
<User> gum (user presses Enter key)
<Program> And how much does gum cost?
<User> .99 (user presses Enter key)
<Program>
Your order was:
chicken $3.50
chips $1.25
gum $.99
Your subtotal comes to $5.74. With 9% sales tax, your total is $6.19.
Please enter cash amount:
<User> 20.00 (user presses Enter key)
<Program>
I owe you back $13.81.
Thank you for shopping with us!
Hint: You will need two separate lists for question 2.
Should companies have a big role in improving the world
: Should companies have a big role in improving the world? Do you think the pharmaceutical businesses have a social responsibility to make drugs that will combat diseases that are a result of poor living conditions, even though profits will be limited?..
|
Determine the process sigma quality level
: A manufacturing firm is attempting to determine whether an existing machine is capable of milling an auto part that has a key specification of 2±0.004 inches. After a trial run on this machine, they have determined that the machine has a process mean..
|
Hypothesis testing and confidence intervals
: In biostatistics, hypothesis testing is used to determine the likelihood of observing a particular value of a sample statistic. Confidence intervals provide a measure of accuracy by allowing us to define a range within which the true population param..
|
Find the dew point temperature of the coil
: Find the design cooling and heating loads of UC 2011. Consider UC 2011 is a detached room. You are free to assume any values reasonably for the calculation. Consult different charts, tables and climate data as necessary. Assuming 40% fresh air and 60..
|
Write a program that prompts the user for a positive integer
: Write a program that prompts the user for a positive integer greater than 1. The program should then output either "prime" if the given number is a prime or "composite" otherwise. Recall that an integer is prime if and only if its only divisors are 1..
|
We want to use excel to generate a frequency distribution
: We want to use Excel to generate a frequency distribution and histogram for these data. The most appropriate bin values for generating these would be
|
Which of these variables is qualitative
: An office supply catalogue gives a description of bookshelves that includes the following variables. Which of these variables is qualitative?
|
Which entry-deterring behavior is most often used
: Of the six possibilities, which entry-deterring behavior is most often used? Explain why you think that strategy was chosen most often? If you were the CEO of a firm, which entrydeterring behavior would you prefer to use? Explain, and be specific.
|
If the objective is one of redistribution
: If the objective is one of redistribution, what are the welfare implications of achieving this redistribution by providing cash supplements versus medical care to the desired beneficiary group?
|