Questions: 5 290

Answers by our Experts: 5 288

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

question: find the perimeter of the given matrix?


input1:-

3 3

1 2 3

4 5 6

7 8 9

output :-

1+2+3+4+6+7+8+9 = 40


input2:-

4 4

1 2 3 4

5 6 7 8

9 10 11 12

13 14 15 16

output:-

1+2+3+4+5+8+9+12+13+14+15+16= 102





mean 

given a list of integers,write a program to print the mean

mean - the average value of all the numbers.

input 

the input will be a single line of containing space-separated integers.

output

the first line of output should contain the mean, round off the value to 2 decimal places.

mean should always be a float value.

mean should be a float value when there are even number of elements, otherwise should be an integer value.

see sample input/output for the output format

explanation 

for example, if the given list of integers are 

2 4 5 6 7 8 2 4 5 2 3 8

the average of all the numbers is 4.67.

after sorting the array,

2 2 2 3 4 4 5 6 7 8 8



what is the pseudocode that will prepare the monthly credit card billing report of a customer. The input will contain the name of the person who has purchased on credit, the previous balance, total purchases and total payments. The output lists the name, interest and new balance.

The amount subject to a finance charge is obtained by adding the total purchases to the previous balance and subtracting the total payments. If the amount subject to a finance charge is $250 or more, interest will be calculated by multiplying this amount by 1.5 percent. Otherwise the interest is calculated as 1 percent of the amount. The new balance is obtained by adding the interest to the amount subject to a finance charge.


How do I make a float just 2 decimal point?


What will the output of this python program be?


def test_function( length, width, height):

  print ("the area of the box is ",length*width*height)

  return length*width*height


l = 12.5

w = 5

h = 2

test_function(l, w, h)



shift numbers -2






given a string, write a program to move all the numbers in it to its start.






input






the input will contain a string A.






output






the output should contain a string after moving all the numbers in it to its start.






explanation






for example, if the given string A is "1good23morning456",the output should be "123456goodmorning",as it contains numbers at the start.






sample input 1






1good23morning456






sample output 2






123456goodmorning






sample input 2






com876binat25ion






sample output 2






87625combination

sum prime numbers in the input



given a list of integers, write a program to print the sum of all prime numbers in the list of integers.


note.one is either prime nor composite number.



input



the input will be a single line containing space separated integers..



output



the output should be a single line containing the sum of all prime numbers from 1 to N



explanation



for example, if the given list of integers are



2 4 5 6 7 3 8



as 2,3,5 and 7 are prime numbers,your code should print the sum of these numbers. so the output should be 17



sample input 1



2 4 5 6 7 3 8



sample output 1



17



sample input 2



65 87 96 31 32 86 57 69 20 42



sample output 2



31



given a four digit number N as input. write a program to print first and last digit of the number




Find latitude and longitude of utmost 20 countries, ordered by population, with a population greater or equal to the population limit given below and have atleast one currency exclusively for themselves. (countries like Madagascar, Sri Lanka but not India, USA). Use the country details from this dataset.





Your task is to find the sum of the length of all lines (in kms) that can be drawn between co-ordinates of these countries.





Assume radius of earth: 6371 km





Round length of each line and final result to 2 decimal points





If co-ordinates are missing for any country use 0.000 N 0.000 E






Population limit: 84497





Note: Population limit will change at random intervals. So please make sure answer is computed for the correct population limit before submitting.






Find latitude and longitude of utmost 20 countries, ordered by population, with a population greater or equal to the population limit given below and have atleast one currency exclusively for themselves. (countries like Madagascar, Sri Lanka but not India, USA). Use the country details from this dataset.






Your task is to find the sum of the length of all lines (in kms) that can be drawn between co-ordinates of these countries.






Assume radius of earth: 6371 km






Round length of each line and final result to 2 decimal points






If co-ordinates are missing for any country use 0.000 N 0.000 E







Population limit: 84497






Note: Population limit will change at random intervals. So please make sure answer is computed for the correct population limit before submitting.

LATEST TUTORIALS
APPROVED BY CLIENTS