My friend made a project and I can't figure out what is wrong it won't carry out the entire code. Please review I need help

import statistics
import math
import sys
import time
def sort_list (list):
list.sort()
min = list[0]
max = list[-1]

def find_quartile1 (list):
len2 = len(list) / 2
if len2 % 2 != 0:
len2 = math.ceil(len2)
list2 = list[0: len2]
return list2
def find_quartile2 (list):
len2 = len(list) / 2
if len2 % 2 != 0:
len2 = math.ceil(len2)
len2 = len2
list3 = list[len2: -1]
list3.append(list[-1])
return list3
def find_IQR1 (quartile1):
print(statistics.median(quartile1))
def find_IQR2 (quartile2):
print(statistics.median(quartile2))
def find_ans (list):
print(‘median:’)
print(statistics.median(list))
print(‘quartile range 1:’)
print(find_quartile1(list))
print(“Quartile 1:”)
find_IQR1(find_quartile1(list))
print(‘quartile range 2:’)
print(find_quartile2(list))
print(“Quartile 2:”)
find_IQR2(find_quartile2(list))
print(“max:”)
print(str(max))
print(‘min:’)
print(str(min))
print(‘list:’)
print(str(list))
choice = input(“Would you like to use the console to input a list? (Y/N)”)
if choice == ‘Y’:
lst =

number of elements as input

n = int(input("Enter number of elements : "))

iterating till the range

for i in range(0, n):
ele = int(input())

  lst.append(ele) # adding the element

print(lst) #Credit to Python | Get a list as input from user - GeeksforGeeks for user list input syntax
choice2 = input(“Is this correct? (Y/N)”)
if choice2 == “Y”:
sort_list(lst)
else:
print(“restart program”)
exit()
elif choice == ‘N’:
print(“Now use the code window. Pause the code. When you are finished, reload the program.”)
lst =
sort_list(lst)
else:
print(“Invalid Choice”)
exit() #end the program

Please could you format it properly, give it a better title and give more information about what it is. This will help us help you. :grinning: