Agenda:
PyCharm - IDE (Integrated Development Environment) for Python. Developer: JetBrains
Pros:
Cons:
How to install
Jupyter Notebook - web interface for IPython (interactive python), free for use
Pros:
Cons:
Link: https://jupyter.org/
How to install
write in command line:
python3 -m pip install --upgrade pip
python3 -m pip install jupyter
reopen command line and write:
jupyter notebook
Official site: https://jupyter.org/install and https://jupyter.readthedocs.io/en/latest/running.html#running
win
How to check
mac
#print()
print('Hello, HSE!')
#it's comment!
'''
it's a comment too
'''
#hot key for comments
# win: ctrl + /
# mac: command +
#variables
a = 5
a='ssdssd'
a={}
print(a)
print('it\'s', a)
print("'")
#indents
i = 4
j = 5
#input()
my_name = input()
print('My name is', my_name)
a = int(nput())
a = 5
type(a)
b = '5'
type(b)
#the same str
b1 = "5"
type(b1)
c = 5.05
type(c)
type(True)
a = int(a)
str(a)
2+3
1234-5
'Nick'+5
'Nick' * 5 - ok
'Nick' - 'Ni' - error
'Nick'+'ola'
a = 2
a = a*3
print(a)
b = 2
b *= 3
print(b)
length = 10
breadth = 5
area = length * breadth
print('The area is', area)
print('The perimeter is', 2 * (length + breadth))
grade = 0.2 * A + 0.5 * H + 0.3 * S - D
print(grade)
#integer division
#An integer division will return the whole part from the division and discard the remainder.
5//2
#modulo division
#modulo division will return the remainder of the division and discard the whole part.
5%2
perimeter = 2 * (length + breadth)
area > perimeter
area < perimeter
area == perimeter
area >= perimeter
area <= perimeter
# apples sharing - 1
# divide a apples between b people evenly, leaving the remaining ones in the basket. How many apples does each person get?
a=int(input())
b=int(input())
print(b//a)
#apples sharing - 2
# divide a apples between b people evenly, leaving the remaining ones in the basket. How many apples remain in the basket?
a=int(input())
b=int(input())
print(b%a)
# power of two
# raise 2 to the power of n
n = int(input())
print(2**n)