Problem Set 1

Types and operators

This problem is for basic understanding of how operators works in python, If you get into error leave that as is

Any line that starts with # is comment

# this is a comment
# python ignores the lines starting with #
print("Comment above is ignored")

Addition ( + )

1. Try to add a string with another string

2. Try to add a string with float

3. Try to add a string with int


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:

4. Try to add a int with int

5. Try to add a int with float

6. Try to add a float with float


In [ ]:


In [ ]:


In [ ]:


In [ ]:

Substraction ( - )

1. Try to substract a string with another string

2. Try to substract a string with float

3. Try to substract a string with int

4. Try to substract a int with int

5. Try to substract a int with float

6. Try to substract a float with float


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:

Division ( / )

1. Try to divide a string with another string

2. Try to divide a string with float

3. Try to divide a string with int

4. Try to divide a int with int

5. Try to divide a int with float

6. Try to divide a float with float


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:

Division ( // )

1. Try to divide a string with another string

2. Try to divide a string with float

3. Try to divide a string with int

4. Try to divide a int with int

5. Try to divide a int with float

6. Try to divide a float with float


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:

Multiplication ( * )

1. Try to multiply a string with another string

2. Try to multiply a string with float

3. Try to multiply a string with int

4. Try to multiply a int with int

5. Try to multiply a int with float

6. Try to multiply a float with float


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:

Power ( ** )

1. Try to use power operator with string, float, int as above


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:

Modulus ( % )

1. Use modulus opeator with string, float, int as above


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:

Booleans ( True/False )

1. Use all operators with booleans


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]: