While taking a viva in class, the teacher decides to take the viva of two roll numbers at a time. For this she calls out the roll numbers from the list of roll numbers as: One roll number from the first nth roll number and Second roll number from the nth last roll number. For example if the numbers are: rollnum=[21, 24, 45, 6, 7, 23, 9, 11, 15, 18], and n=4, then :One roll number called for viva is 6 and second roll number called for viva is 9.
You need to write a python function which take a list A and nth roll number as input and return first nth roll number and Second roll number from the nth last roll number as shown in example. If nth roll number is not lies in the range of list, then function will return "n is not in range" in place of first roll number and empty string (“”) in place of second roll number.
Example-1
Example-2
Input:
[21, 24, 45, 6, 7, 23, 9, 11, 15, 18]
20
Output:
n is not in range
Input:
[21, 24, 45, 6, 7, 23, 9, 11, 15, 18]
5
Output:
7
23
write a python function Separate_List(A) which take list A as input and return five lists, one contains all prime numbers in A, second one contains composite numbers in A, the third list contains all numbers in A which are neither divisible by 2, fourth and fifth list contains number divisible by 3 and 5 respectively.
Example-1
Example-2
Input:
1
2
3
4
5
10
15
20
30
Output:
[2, 3, 5]
[4, 10, 15, 20, 30]
[2, 4, 10, 20, 30]
[3, 15, 30]
[5, 10, 15, 20, 30]
Input:
1
3
5
6
7
8
9
10
Output:
[3, 5, 7]
[6, 8, 9, 10]
[6, 8, 10]
[3, 9]
[5, 10]
aldo's shoes bought a shipment of 667 pairs of women's shoes for $36.00 per pair. The store sold 122 pairs at the regular selling price of $228.00 per pair, 78 pairs at a clearance sale at a discount of 35% and the remaining pairs during an inventory sale at a price that equals cost plus overhead. The store's overhead is 25% of cost.
(a) What was the price at which the shoes were sold during the clearance sale?
(b) What was the selling price during the inventory sale?
(c) What was the total profit realized on the shipment?
(d) What was the average rate of markup based on cost that was realized on the shipment?
Given an array A of N integers and two integers X and Y, find the number of integers in the array that are both less than or equal to X and divisible by Y.
How has having an opposable thumb helped primates, especially humans, adapt to their environment and survive better than other animals?
Write the vector (1, −2, 5) as a linear combination of the vectors (1, 1, 1),(1, 2, 3)
and (2, −1, 1)
Natural selection allows certain species to survive. The organisms that survive are those best adapted to their environment. Does natural selection make organisms more complex and perfect?
Consider the following systemof linear equations:
x+2y+2z=1,x+ay+3z=3,x+11y+az=b.
For which values of a does the system have a unique solution. and for which pairs of values (a,b) does the system have more than on solution?
the dean of admissions in a large university has determined that the scores of the freshman class in a mathematics test are apporoximately normally distributed with a mean 72 and a standard deviation of 4 based of this information,what is the probability that the mean score of a sample of 64 students it at least 73
Suppose you need a capacitor bank with a total capacitance of 0.750-mF but you have only 1.50-mF capacitors at your disposal. What is the smallest number of capacitors you could connect together to achieve your goal, and how would you connect them?