Proper Fractions
Given 2 fractional values A/C. B/D where A, B are numerators and C. D are denominators. You are asked to add two fractional values. If the sum gives proper fraction as output print the proper fraction. If it is improper, convert it into a mixed fraction and print it. If it is a whole number, print it.
Input
The first line of input contains two space-separated strings A/C &B/D
Output
The output should be a string of format p/q if the result is a proper fraction
a b/c if the result is a improper or med fraction
a if the result is a whole number
Discount Sale
It is a Summer Discount sale in Mumbai and all the local shops have put up various offers. Arjun selected N items to buy. While standing in the billing queue, he noticed the offer "Buy two! Get two FREE!!". This means that for every two items he buys, they give him two items for free. However, items can be of varying prices, they always charge for the two most costly items and give the other two as free. For example, if the items cost 1, 1, 2, 2, then you have to pay four rupees and take all four items.
Arjun is confused with grouping his items to reduce the total price ho has to pay. Your task is to find the minimum price Arjun has to pay to buy all the N items.
(a) The mean and standard deviation of a set of values are 25 and 5, respectively. If a constant value 5 is added to each value, the coefficient of variation of the new set of values is equal to 10%.
(b) If (A) = 90, (AB) = 40, N = 150 and (β) = 80 then (αβ) = 30.
The numbers 3.2, 5.8, 7.9 and 4.5 have frequencies Y, (Y + 2), (Y - 3) and (Y + 6), respectively. If the arithmetic mean is 4.876, find the value of Y and write the whole series.
The value of Spearman's rank correlation coefficient of a set of non-repeating values was found to be 2/3. The sum of the squares of difference between the corresponding ranks was 55. Find the number of pairs.
Given the following data: r12 = 0' 8 , r13 = 0.6 and r23= 0.4 then find
(i) r12.3
(ii) r13.2
(iii) r23.1
(iv) R1.23
In a statistical study relating to the prices (in T) of two shares, X and Y, the following two regression lines were found as 8X - 10Y + 70 = 0 and 20X - 9Y - 65 = 0. The standard deviation of X = 3, then find (i) the values of X and Y, (ii) r(X, Y), and (iii) standard deviation of Y.
An investigation of 23713 households was made in an urban and rural mixed locality. Of these 1618 were farmers, 2015 well to do and 770 families were having at least one graduate. Of these graduate families 335 were those of farmers and 428 were well to do; also 587 well to do families were those of farmers and out of them only 156 were having at least one graduate. Obtain all the ultimate class frequencies.
If a finite population has four elements: 6, 1, 3, 2.
(a) How many different samples of size n = 2 can be selected from this population if you sample without replacement?
(b) List all possible samples of size n = 2.
(c) Compute the sample mean for each of the samples given in part b.
(d) Find the sampling distribution of x.
(e) Compute standard error.
(f) If all four population values are equally likely, calculate the value of the population mean μ . Do any of the samples listed in part (b) produce a value of x exactly equal to μ ?
def calculate_vat(amount):
amount * 1.2
total = calculate_vat(100)
print(total)
When your boss runs the program they get the following output:
None
Your boss expects the program to output the value 120 . What is wrong? How do you fix it?