Skip to content

bajracharya-kshitij/numpy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

The aim here is to demonstrate the use of NumPy to solve problems and in the process learn the basics of NumPy.

The following are the problems we will be solving here:

Problem 1

You are given 5 cylindrical containers with different radius and heights ranging between 5 and 25 cm. Find out
a) the volume of water that each container can contain,
b) the total volume of water that all containers can contain,
c) which container can hold the highest volume and how much,
d) which container can hold the least volume and how much,
e) what is the mean, median and standard deviation of the volumes of water that can be contained in the containers?

Problem 2

25 cards numbered 1 through 25 are randomly distributed equally amongst 5 people. Find the sum of cards for each person such that for the 1st person, the sum is the value of 1st card minus the sum of rest of the cards; for the 2nd person, the sum is the value of 2nd card minus the sum of rest of the cards, and so on. The person for whom the sum of the cards is greatest will be the winner. Find the winner.

Problem 3

You are given a rope of length 5m. Cut the rope into 9 parts such that each part is of equal length.

These problems will demonstrate the use of the following:

  1. ones()
  2. random()
  3. size
  4. ndim
  5. shape
  6. dtype
  7. reshape()
  8. slicing
  9. pi
  10. sum()
  11. square()
  12. dot()
  13. max()
  14. min()
  15. mean()
  16. median()
  17. std()
  18. argmax()
  19. argmin()
  20. arange()
  21. eye()
  22. multiply()
  23. add()
  24. linspace()

About

Learning NumPy basics while solving problems

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published