Unit 1
Lecture Source Code
print("Unit 1")
# Example 1
a = 1
b = 2
print(a + b)
# Example 2
a = 3
b = 4
print(a - b)
# Example 3
a = 5
b = 6
print(a * b)
# Example 4
a = 121
b = 11
print(a / b)
# Example 5
a = 77
b = 10
print(a // b)
# Example 6
a = 9
b = 2
print(a % b)
# Example 7
a = 8
b = 2
print(a % b)
# Example 8
a = 2
b = 3
print(a ** b)
# Example 9
myName = input("What is your name? ")
print("Name: " + myName)
# Example 10
age = int(input("How old are you? "))
print("Age: " + str(age))
# Example 11
money = float(input("How much money do you have? "))
print("Money: $" + str(money))
Assignment Source Code
print("Name: ") # add your name
print("Date: ") # add your date
print("Unit 1 Assignment")
# Problem 1
print("Problem 1")
# Problem 2
print("Problem 2")
# Problem 3
print("Problem 3")
# Problem 4
print("Problem 4")
# Problem 4
print("Problem 4")
# Problem 5
print("Problem 5")
# Problem 6
print("Problem 6")
# Problem 7
print("Problem 7")
# Problem 8
print("Problem 8")
# Problem 9
print("Problem 9")
# Problem 10
print("Problem 10")
Last updated