﻿# an existing list of numbers hidden in the hat
hat_list = [1, 2, 3, 4, 5]

# ex. 1: write a line of code that prompts the user
# to replace the middle number with an integer number entered by the user

hat_list[2] = input("Give me any number ")

# ex. 2: write a line of code here that removes the last element from the list

del hat_list[4]

# ex. 3: write a line of code here that prints the length of the existing list

print(len(hat_list))

# printing the list
print(hat_list)