Hey I've got a very simple problem, however all the places i look to fix it don't seem to work. So for school we gotta do this thing where we save user input to an excel file and where i do Mylist.append(phone) i get an error saying phone is not defined. Any idea on how to fix this?
#Zacharriah Task 3
import csv
from IPhone import*
from Android import*
import time
def start():
print('Hello Welcome to the Phone Trouble-Shooter')
time.sleep(2)
phone = input('Please input what brand of phone you have')
if "iphone" in phone:
print('Your phone has been identified as an Iphone')
elif "android" in phone:
print('Your phone has been identifies as an Android')
file = open("Excel_Task_3.csv", "w", newline = "")
fileWrite = csv.writer(file,delimiter = ",")
Mylist = []
Mylist.append(phone)
fileWriter.writerow(Mylist)
file.close()