by CodeChum Admin
Let’s try to find out whether a year has 365 or 366 days. To do this, we need to create a leap year detector!
Conditions for a leap year:
1.) year must be divisible by 4 and not divisible by 100
2.) If year is divisible by 100, it must be divisible by 400 for it to be a leap year.
Instructions:
Input
1. Year to be checked
Output
If a certain year is a leap year, print "<INSERT_YEAR_HERE> is a leap year"
Otherwise, print "<INSERT_YEAR_HERE> is not a leap year"
Enter·year:·2020
2020·is·a·leap·yearPreserving the Gene Pool
by CodeChum Admin
In order to make sure that the future generations will grow into great beings, we must make sure that the gene pool consists of the best genes. In order to do that, we must compare genes from each other and find out which one is the best!
Instructions:
In the code editor, you are provided with a main() function that asks the user for 4 integer inputs and passes these to the getBest() function call.
Your task is to declare and define this getBest() function which has the following details:
Return type - int
Name - getBest
Parameters - 4 integers
Description - returns the highest integer passed
DO NOT EDIT ANYTHING IN THE MAIN
Input
1. First integer
2. Second integer
3. Third integer
4. Fourth integer
Output
Enter·a:·10
Enter·b:·3
Enter·c:·15
Enter·d:·14
Highest·integer·=·15
Pairing Up
by CodeChum Admin
You’re tasked with pairing up people with each other but you need to figure out how well both of them work together. In order to find out how effective each pair is, you need to create a program that adds both of their values and returns their sum.
Instructions:
In the code editor, you are provided with a main() function that asks the user for two integer inputs, passes these to a function called, getSum(), and then prints the returned value.
Your task is to declare and define the getSum() function which has the following details:
Return type - int
Name - getSum
Parameters - 2 integers
Description - adds the passed integers and returns their sum
DO NOT EDIT ANYTHING IN THE MAIN
Input
1. First integer
2. Second integer
Output
Enter·first·number:·24
Enter·second·number:·21
Sum·=·45
Read the article by Hlongwane , "The British Coloureds Children,1993-1998, "New centre 78,2(2017)
Then deduce the main arguments from the narrative of St Joseph's Home and summarize into a concise synopsis of 400 words
Make a truth table to determine the logical equivalence of the statements.
A mass of 0.750 kg is hung from a vertical spring with a spring constant of 20 N/m. After coming to equilibrium the mass is then pulled down an additional distance 10 cm and then released from rest. The mass then oscillates from position 3 to 4 to 5 to 4 and back to 3 over and over.
A) List the types of nonzero energy that the system has at xmin (Position 5). B) Calculate xeq.
C) Calculate hmax.
D) Calculate the total energy of the system at xmax (Position 3).
E) Calculate the maximum speed.
F) Calculate the amounts of EK, Eg, and ES when the mass is 4.00 cm above the equilibrium position.
G) Explain two ways that the maximum speed can be decreased
by CodeChum Admin
Looping a number and taking away each digit of it is so much fun, but I wanted to try out a much more complex task: getting the largest digit among them all.
Think you can handle the job?
Instructions:
Input
A line containing an integer.
214Output
A line containing an integer.
4Determine the type of bond in each pair of atoms. Which is the most polar bond? Least polar? Support your answers by calculating the electronegativity difference in each pair.
Cl - F, O - S, P - N, Na - Cl
Consider a population consisting of the values (1, 3, 4). Solve for the following:
A.
a. Compute the population mean.
b. Compute the population variance.
c. Compute the population standard deviation.
B.
a. List all the possible samples of size 2 that can be drawn from the population with
replacement.
b. Compute the mean of the sampling distribution of the means.
c. Compute the variance of the sampling distribution of the means.
d. Compute the standard deviation of the sampling distribution of the means.
e. Construct the probability histogram of x̅ with replacements when n = 2.
C.
a. List all the possible samples of size 2 that can be drawn from the population without
replacement.
b. Compute the mean of the sampling distribution of the means.
c. Compute the variance of the sampling distribution of the means.
d. Compute the standard deviation of the sampling distribution of the means.
e. Construct the probability histogram of x̅ with replacements when n = 2.
Find the formal charge of each atom in the given compounds/polyatomic ion.
a. HBr
b. N₂0
c. SO₄²⁻