# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# # Excercises for Lecture 2
#
# Your Name:   
# Your UID:   
# Your E-Mail:  

# ## Exercise 1: Data types and operations
# Play around with data types and operations. Try the following things:
#
# 1. Define two variables and assign an integer to the first and a float to the second. Define a new variable and assign the sum of the previous two variables. What's the data type of the third variable?
# 2. Reassign a variable with a different data type, e.g., take one of your numerical variables and assign a string to it. What's the new data type?
# 3. See what happens if you try to add a string to a string.
# 4. See what happens if you add a string to a float or an integer.

# +
# your code
# -

# ## Exercise 2: Running Programs
#
#  * Create a new file python file and use the simple function as a template. Modify the code to add two numbers instead of doubling a single number.
#  * Can you guess what would happen if you change the indentation? Try it out.
#  * Try what happens if you print `a` at the very end of the program. Can you explain what's going on?
#  
# If you want to submit this activity, paste the content of your python file here:  

# +
# your code
# -

# ## Exercise 3: Creating Cells, Executing Code
#
# 1. Create a new code cell below where you define variables containing your name, your age in years, and your major.
# 2. Create another cell that uses these variables and prints a concatenated string stating your name, major, and your age in years, months, and days (assuming today is your birthday). The output should look like that:
#
# ```
# Name: <NAME>, Major: Computer Science, Age: 94 years, or 1128 months, or 34310 days. 
# ```

# ## Exercise 4: Functions
# Write a function that 
#  * takes two numerical variables
#  * multiplies them with each other
#  * divides them by a numerical variable defined in the scope outside the function
#  * and returns the result. 
#  
# Print the result of the function for three different sets of input variables. 



StarcoderdataJupyterScriptsDedupFiltered