Skip to content

Commit 73c57b1

Browse files
committed
Update
1 parent 2c3c20e commit 73c57b1

File tree

3 files changed

+165
-64
lines changed

3 files changed

+165
-64
lines changed

.idea/workspace.xml

Lines changed: 135 additions & 60 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

8_MiniPrograms/13_PrimeNumberChecker.py

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,26 @@
1+
# Install pip from here: https://pip.pypa.io/en/stable/installing/
2+
# pip is a package manager. if you want to install library in Python, just run pip install <name-of-library>
3+
# and you need to go to your cmd or terminal to run this pip install <name-of-library>
4+
5+
# Eg: You want to install Numpy library.
6+
# Go to cmd (Windows) or Terminal(Mac, Ubuntu)
7+
# Type: "python" or "python3" without the double quotes.
8+
# Then press Enter.
9+
# If you get something like this -- Python 3.7.0 (v3.....)
10+
# Then it means your Python is on Path and now you're ready to run pip.
11+
12+
# Type: "pip install numpy"
13+
# It'll start downloading and then install automatically.
14+
15+
# Install numpy from here: https://pypi.org/project/numpy/
16+
117
# This program will take input from User and tell whether it's Prime or Not.
218

3-
import numpy as np # numpy is a mathematical library which does fast computation
19+
20+
import numpy as np # numpy is a mathematical library which does fast computation
21+
22+
# "as" is used to give a short name to library.
23+
# you can write numpy as p, or numpy as num also. But accepted convention is np
424

525
print('''
626
Hey! Enter a number and I'll tell you if it's prime or not.
@@ -10,9 +30,9 @@
1030

1131
if num >= 2:
1232
divisors_list = []
13-
for divisor in range (2, num):
33+
for divisor in range(2, num):
1434
# if num % divisor == 0: # you can even use this commented 'if' statement.
15-
if np.remainder(num, divisor) == 0: # this makes calculation faster
35+
if np.remainder(num, divisor) == 0: # this makes calculation faster
1636
divisors_list.append(divisor)
1737

1838
if len(divisors_list) == 0:
@@ -31,4 +51,4 @@
3151
If the list is empty, number is prime.
3252
If the list has elements, the number is not prime.
3353
If user inputs any number less than 2, it says please enter a number greater than 1.
34-
'''
54+
'''

9_ImageManipulation/18_Pillow.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Install pip from here: https://pip.pypa.io/en/stable/installing/
2+
# pip is a package manager. if you want to install library in Python, just run pip install <name-of-library>
3+
# Install Pillow from here: https://pypi.org/project/Pillow/
4+
5+
from PIL import Image
6+

0 commit comments

Comments
 (0)