Module A HW 1 Draft¶
Version: August 20th, 2025
This homework assignment focuses on 3 aspects of coding:
Primitive Data Types
Variables
Built-in Functions
Part A: Variables¶
To get familiar with variables, we are going to create a profile that contains information about you through storing information through variables.
# Fill out the ... part with your information.
# If you do not fill comfortable sharing your profile, you can make up a profile.
name = ...
age = ...
city = ...
state = ...
# These variables are checking whether you are a student/have a job right now, what data type would work best?
student = ...
job = ...Sample Output:
#Type your answer herePart B: Data Type¶
Now let’s try to understand data types of these variables. For each question, assign your answer from the multiple choice in a string format.
Example) What is a cat?
1. A feline species
2. A human
3. An alien
answer = "1"Integers
Floats
Strings
Booleans
None
answer_3 = ...Integers
Floats
Strings
Booleans
None
answer_4 = ...name
age
city
state
student
job
Type your answer here
To do this, fill in where you see yourself in 5 years into the new variables listed below.
five_year_later_local = ...
five_year_later_job = ...Sample Output:
#Type your answer herePart C: Arithmetic Operators¶
In python, we can use arithmetic operators to increase the value for age, meaning it isn’t necessary to create a new variable!
Make sure to use the previous variables from Question 1 in your updated profile print statement.
Sample Output:
#Type your answer herePart D: Lists and Sorting¶
An integral part of python programming is utilizing lists to store information, whether it be numerical or categorical.
Create a list named clothes, which has the following items: shirts, pants, shorts, jackets, and hats
#Type your answer here#Type your answer hereHint: Use the sum() function!
#Type your answer here(Sort the inventory list by name alphabetically)
#Type your answer here