Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

PYTHON How can I put the xlrd module into my codes. plz help. mycodes: from Tkin

ID: 645132 • Letter: P

Question

PYTHON

How can I put the xlrd module into my codes. plz help.

mycodes:

from Tkinter import *

from tkFileDialog import askopenfilename

def callback():

name= askopenfilename()

print name

root = Tk()

root.configure(background='powder blue')

root.geometry("600x680")

title=root.title("Virtual Advisor")

file= Label (text="Virtual Advisor v1.0",font="Times 25 bold",bg="powder blue")

file.pack()

button1=Button(text='Load Past Student Grades', command=callback)

button1.place(relx=0.1, rely=0.2)

button2=Button(text='Load Your Current Transcript', command=callback)

button2.place(relx=0.6, rely=0.2)

button3=Button(text="See the Recommended Courses")

button3.place(relx=0.1, rely=0.45)

frame = Frame(width=500, height=80, bg="tomato", colormap="new")

frame.pack()

frame.place(relx=0.1,rely=0.28)

t1=Label(text="Similarity Measure:",font="Times 15",bg="tomato")

t1.pack()

t1.place(relx=0.54, rely=0.3)

t2=Label(text="Collaborative Filtering Type:", font= "Times 15",bg="tomato")

t2.pack()

t2.place(relx=0.1, rely=0.3)

#def sel():

# selection = "You selected the option " + str(var.get())c

#label.config(text = selection)

var = IntVar()

R1 = Radiobutton(root, text="User-based", variable=var, value=1,bg="tomato")#command=sel)

R1.pack( anchor = W )

R1.place(relx=0.3, rely=0.3)

R2 = Radiobutton(root, text="Item-based", variable=var, value=2, bg="tomato") #command=sel)

R2.pack( anchor = W )

R2.place(relx=0.3, rely=0.34)

OPTIONS = ["Pearson","Euclidean","Jaccard"]

variable = StringVar(root)

variable.set(OPTIONS[0]) # default value

w = apply(OptionMenu, (root, variable) + tuple(OPTIONS))

w.pack()

w.place(relx=0.7, rely=0.3)

mainloop()

Explanation / Answer

// for storing header and data seperately