Given months and temperature (in ºC) data as shown in the code snippet below:
string[] month = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul",
"Aug", "Sep", "Oct", "Nov", "Dec" };
double[] temperature = { 3.0, 5.6, 9.7, 13.8, 19.0, 24.5, 26.0, 25.0,
21.3, 14.6, 7.6, 2.8 };
a) Determine the temperature classification based on the table given.
Temperature Classification Temperature Range
Freezing < 0 ºC
Very Cold 0 ºC – 5.9 ºC
Cold 6 ºC – 9.9 ºC
Cool 10 ºC – 13.9 ºC
Mild 14 ºC – 17.9 ºC
Moderate 18 ºC – 22.9 ºC
Warm 23 ºC – 26.9 ºC
Very Warm 27 ºC – 29.9 ºC
Hot > 30 ºC
b) Determine the minimum and maximum value from the array of temperature
given. Subsequently, compute the average mark (rounded to 2 decimal
places).
Write a function called has_duplicates that takes a string parameter and returns True if the string has any repeated characters. Otherwise, it should return False.
Implement has_duplicates by creating a histogram using the histogram function above. Do not use any of the implementations of has_duplicates that are given in your textbook. Instead, your implementation should use the counts in the histogram to decide if there are any duplicates.
Write a loop over the strings in the provided test_dups list. Print each string in the list and whether or not it has any duplicates based on the return value of has_duplicates for that string. For example, the output for "aaa" and "abc" would be the following.
aaa has duplicates
abc has no duplicates
Print a line like one of the above for each of the strings in test_dups.
Account numbers sometimes contain a check digit that is the result of a mathematical calculation. It is used to help ascertain whether the number is a valid one. Develop a simple C# application that asks a user to enter a four-digit account number and determines whether it is a valid number. The number is valid if the fourth digit is the remainder when the number represented by the first three digits of the four-digit number is divided by 7. For example, 7770 is valid, because 0 is the remainder when 777 is divided by 7.
Write a program to find the total and average of a set of numbers entered by a
user. The following provides additional details on how the program should work:
• The program should prompt the user how many numbers they want o
process.
• Once user input is obtained, user will be asked to enter the numbers
used to calculate the total and average repeatedly. (Data validation
must be performed to ensure that the user input is between 1 to 100
inclusive)
• Finally, the total and average calculated will be displayed to the user.
Date Format - 2
Given seconds as input, write a program to print in D days H hours M minutes S seconds.
Input
The input will be a single line containing an integer.
Output
The output should be a single line containing the D Days H Hours M Minutes S Seconds format. Print only the non-zero values.
Explanation
For example, if the given seconds are 200. As 200 seconds is equal to 3 minutes and 20 seconds, and days, hours are zero, so ignore the days and hours. So the output should be "3 Minutes 20 Seconds"
Sample Input 1
200
Sample Output 1
3 Minutes 20 Seconds
Sample Input 2
86400
Sample Output 2
1 Days
Let f : R → R be defined by f(x) = (x3 + 1)/2
a. Prove that f is bijective
b. Determine f -1 (x) and f o f o f -1
An electrochemical cell consists of a nickel electrode in an acidic solution of 1.00M Ni(No3)2 connected by a salt bridge for a second component with na Al electrode in acidic solution of 1M Alcl3. Calculate the change in voltage when the cell described above has initial conc of 0.500M Ni(No3)2 and 0.750 M Alcl3?
The average age of public jeepneys plying in Metro Manila is 15 years. Assume that the standard deviation is 8 years. If a random sample of 25 public jeepneys is chosen, Find the probability that the mean of jeepneys ages is between 12 and 19.
This item is 10 points. A population consists of the five measurements 1, 5, 3, 8, and 10 . Suppose samples of size 2 are drawn from this population.
Compute and find the following:
1) Find the variance of the population.
2) Find the variance of the sampling distribution.
True or False.
Total internal reflection will happen as the light ray goes from inside a diamond to the air outside, but not when the light ray goes from the air to the diamond.