Homework Answers

Math 51397 50414
Physics 44335 44333
Chemistry 40988 40988
Economics 30646 30644
Programming & Computer Science 26878 26876
English 10084 10084
Biology 8111 8109
Management 6239 6239
Engineering 6056 6056
History 3490 3489
Psychology 2129 2129
Sociology 1858 1858
Geography 1574 1574
Marketing 1443 1443
Philosophy 1001 1001
Political Science 892 891
Law 876 876
French 438 438
Other 199 199

Questions: 238 634

Answers by our Experts: 237 641

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

You will be given a list of tuples where each tuple indicates a point i.e. (x, y) in a 2-dimensional coordinate system. You need to write a python program to find the minimum distance and the point that is closest to the origin i.e. (0,0)

Hint:

The formula of distance =√ [ (x₂ - x₁)² + (y₂ - y₁)²]

As you are calculating the distance from the origin (0,0), you can simply use distance = √ [ (x²+y²)] 

You can create a list of distances from each point and sort that list using your personal favorite sorting algorithm.


Sample Input 1 

points = [(5,3), (2,9), (-2,7), (-3,-4), (0,6), (7,2)] 

Sample Output 1 

Minimum distance = 5.0 

Here the closest point is (-3,-4) which has a distance of 5.0 from the origin.


Sample Input 2 

points = [(1,7), (4,5), (-1,7), (-2,0), (1,1), (5,-1)] 

Sample Output 2 

Minimum distance = 1.4142135623730951 Here the closest point is (1,1) which has a distance of 1.4142135623730951 from the origin.


CCl4 + SbF3 = CCl2F2 + SbCl3




How many grams of CCl4 are needed to react with 5.0 mol SbF3?

A sample of helium behaves as an ideal gas as it is heated at constant pressure from 253 K to 368 K. If 20 J of work is done by the gas during this process, what is the mass of the helium sample? The universal gas constant is 8.31451 J/mol · K. Answer in units of g.


SNAKY CONVERSION

you are given a string S print the string in N rows containing a snaky pattern represenation as described below

INPUT:the first line should be a string

explanation:

s=AWESOMENESS N=4

consider the following snaky representation of the word

A E

W M N

E O E S

S S

the first row contains characters AE

the 2nd row contains characters WMN

the 3rd row contains characters EOES

THE fourth row contains characters SS

INPUT:

NEWSLETTER 3

OUTPUT:

NLE

ESETR

WT

INPUT:AWESOMENESS 4

OUTPUT:

AE

WMN

 EOES 

SS


A system releases 622 kJ of heat and does 105 kJ of work on the surroundings. What is the change in internal energy of the system?


car start from rest and accelerate uniformly for 10s until it attains a velocity of 25m/s it then travel with the uniform velocity for 20s before decelerating sketch a velocity time graph of the motion of the car

What is the velocity of a 0.5 kg ball that has a momentum of 3.0 kg m/s?


In garden peas, green pod color is dominant over yellow pods. Also, round seed shape is dominant over wrinkled seed. Cross-fertilization was done between a pea that is homozygous dominant for pod color with heterozygous round shape and another pea that is heterozygous for both pod color and seed shape. Determine the genotypic ratio and phenotypic ratio of the offspring.


What is the velocity of a 0.5 kg ball that has a momentum of 3.0 kg m/s?


There is a chocolate vending machine.intially it contains a total of K chocolates N people are standing in a queue from left to rigth.Each person wants to withdraw chocolates.The i-i-th person wants to take Ai units of chocolates.People come in and try to withdraw chocolates one by one,in the increasing order of their indices.Whenever someone tries to withdraw chocolate,it will give them.Otherwise,it will throw an error and not give out anything in that case this person will return home directly without trying to do anything else for each person determine whether they will get the required amount of chocolate or not

input:The 1st line of input contains a single integer T denoting the no.of test cases the description of T test cases follows

the first line of each test case contais two separated integers N and K

the second line contains N space-separated integers A1,A2,A3----AN

INPUT:

2

5 10

3 5 3 2 1

4 6

10 8 6 4

OUTPUT:

11010

0010

INPUT:2

6 15

16 1 2 6 4 5

10 5

1 2 6 5 4 3 2 1 1 1

OUTPUT:

011110

1100001000


LATEST TUTORIALS
APPROVED BY CLIENTS