# operations between numbers (integer)
# the same is valid with float
a = 5
b = 3
print("sum", a+b)
print("product", a*b)
print("division", a/b)
print("integer division", a//b)

# operations between strings
c = 'hallo'
d = '!'
print(c+d)

## N.B. you cannot sum a number and a string
## the following lines will give an error
#a = 'hallo'
#b = 5
#print(a+b)

# If you want to read a string as a number (if it is possible!)
# you have to cast it as a number calling the requested type:
# int, float, str, ...
a = '3'
b = 5
print(int(a)+b)

# operations between lists
# the sum will append the two list
a = [5, 2, -1, '4', '.']
b = [5, 1, 2, 'a','c']
print(a+b)

# you can access to the element of a list
# using the indeces
print(a[0]+b[0])

# methods:
# a method in python is a function that takes some
# arguments and executes some commands.
# N.B. pay attention to the indentation!!!

# first method
def who_are_you( ):
    
    # read input string
    name = input("What's your name? ")
    a = ", nice to meet you!"
    
    # print out
    print("Hello {}{}".format(name, a))
