Homework 0 - Using Python
Due Date: September 1, 2023
Upload your .py
file using the Upload link by 11:59 pm on the due date. For each problem, start your solution by using the characters #%%
on the first line of your solution. These three characters create a cell in Spyder. For questions that do not require you to write a program, write your answers using Python comments which start with the hash symbol #
. For example, if you were asked to explain what the int
function does then you would type the following in the Spyder editor:
#%% Problem 1
# The int() function is a built-in function that returns
# an integer object constructed from a number
# or string, or returns 0 if no arguments are given.
Or you can use triple quotes:
#%% Problem 1
""" The int() function is a built-in function that returns
an integer object constructed from a number
or string, or returns 0 if no arguments are given."""
Problems
- Who invented Python?
- What is the name of the Python integrated development environment (IDE) that we will use in this course?
- What are the symbols used in Spyder to start a cell?
- Use the editor in Spyder to calculate \(3/4 - 5/17 + 11/73\). Write the expression and then execute the cell, you should see your answer in the console.
- What is the latest version of Python?