name = "Vance"

print(name)

myheight = "5'11"

print(myheight)
Vance
5'11
# Popcorn Hack 2

friend = "Ronit"
print(friend)

number_of_enemies=2
print(number_of_enemies)

bestfriends=2
print(bestfriends<3)
Ronit
2
True
# Popcorn Hack 3

num1 = 25
num2 = 50
num3 = 100

print(num1)
print(num2)
print(num3)

total_sum = num1+num2+num3

print(total_sum)


25
50
100
175
# Popcorn Hack 4

info = "asdfghjkl;'"

list = ["name", "height", "friend", True, 10.9, 20.1, [1,2,3,4]]

print("second element is")
print(list[2])

print("fourth element is")
print(list[4])

print("first element is")
print(list[1])
second element is
friend
fourth element is
10.9
first element is
height
dictionary = {
    "name: ": "Vance",
    "age: " :15
}

print(dictionary)
{'name: ': 'Vance', 'age: ': 15}

Homework

class Person:
    def __init__(self, name, age):
        self.name = name
        self.age = age

def print_people(people_list):
    for person in people_list:
        print(f"Name: {person.name}, Age: {person.age}")

def find_oldest_person(people_dict):
    if not people_dict:
        print("The dictionary is empty.")
        return

    oldest_person = max(people_dict, key=people_dict.get)
    print(f"The oldest person is {oldest_person} with age {people_dict[oldest_person]}.")

person1 = Person("Ronnit", 16)
person2 = Person("Vance", 15)
person3 = Person("Greg", 56)

people_list = [person1, person2, person3]

people_dict = {
    "Ronnit": 16,
    "Vance": 15,
    "Greg": 56
}

print("People in the list:")
print_people(people_list)

print("\nOldest person in the dictionary:")
find_oldest_person(people_dict)
People in the list:
Name: Ronnit, Age: 16
Name: Vance, Age: 15
Name: Greg, Age: 56

Oldest person in the dictionary:
The oldest person is Greg with age 56.