# Print simple text to console
print("Hello World")
# Store Value in a variable
a = 5
a
# Import a Package
import numpy as np
# Generate random data
data = [np.random.standard_normal() for i in range (7)]
data
data[2:5]
print(data)
# Create a Function
def add_numbers(a, b):
"""
Add two numbers together
Returns
the_sum : type of arguments
"""
return a + b
add_numbers(5,7)
# Integer
a = 108
a
type(a)
# Float
b = 100.7
b
# Complex
c = 100 + 200j
c
type(c)
d = 300 + 500j
d
e = c + d
e
a = [4, 6, 3, 2, 5]
a
type(a)
a[3]
b = ['Physics', 'Chemistry', 91,100]
b
b[-1]
91 in b
b.index(91)
a = (1, 2, 3, 4, 5)
a
type(a)
b = (3,5,6)
b
a + b
a*2
a*= 3
print(a)
capitals = {'France': 'Paris', 'Germany': 'Berlin', 'Italy': 'Rome'}
capitals
capitals2 = {'United Kingdom': 'London', 'United States' : 'Washington'}
capitals2
capitals.update(capitals2)
capitals
set([2 ,2, 2, 1, 3, 3])