Savitribai Phule Pune University T.Y.B.B.A.(C.A.) Python Practical Slip 28 Answers

    Write a Python program

Slip 28 A) Write a Python GUI program to create a list of Computer Science Courses using Tkinter module (use Listbox).

Answer :


import tkinter as tk parent = tk.Tk()

parent.geometry("250x200")

label1 = tk.Label(parent,text = "A list of Computer Science Courses ") listbox = tk.Listbox(parent)

listbox.insert(1,"PHP") listbox.insert(2, "Python") listbox.insert(3, "Java") listbox.insert(4, "C#") label1.pack() listbox.pack() parent.mainloop()

Output :

 

Slip 28 B) Write a Python program to accept two lists and merge the two lists into list of tuple.

Answer :

lst1=[1,2,3,5]

lst2=["SVPM","Baramati"]

t1=tuple(lst1)

t2=tuple(lst2)

t3=t1 + t2

print(t3)

Output :

Savitribai Phule Pune University T.Y.B.B.A.(C.A.) Python Practical Slip 28 Answers Savitribai Phule Pune University T.Y.B.B.A.(C.A.) Python Practical Slip 28 Answers Reviewed by technical_saurabh on December 31, 2021 Rating: 5

No comments:

Powered by Blogger.