0% found this document useful (0 votes)
23 views35 pages

Bhanushali Python

Uploaded by

botpixie02
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views35 pages

Bhanushali Python

Uploaded by

botpixie02
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 35

Name: Samruddhi Mali Roll no:-3131 Python Programming

Practical no 1
A. Create a program that asks the user to enter their name and their age. Print out a message
addressed to them that tells them the year that they will turn 100 years old.

import datetime
name = input("Hello! Please enter your name: ")
print("Hello " + name)
age = int(input("Enter your age: "))
year_now = datetime.datetime.now()
# print(year_now.year) print("You will turn 100 in " + str(int(100-age) +int(year_now.year)))
Output:

B. Enter the number from the user and depending on whether the number is even or odd, print
out an appropriate message to the user.
num = int(input("Enter a number: "))
if (num % 2) == 0:
print("{0} is Even".format(num))
else:
print("{0} is Odd".format(num))
Output

C. Write a program to generate the Fibonacci series.

nterms = 10

n1 = 0

n2 = 1

Page | 1
print("Fibonacci sequence upto",nterms,":")

Name:Samruddhi Mali Roll no:-3131 Python Programming

count = 2

if nterms<= 0:

print("Please enter a positive integer")

elif nterms == 1:

print(n1)

else:

print("Fibonacci sequence upto",nterms,":")

print(n1,",",n2,end=', ')

while count < nterms:


nth = n1+n2

print(nth,end=' , ')

n1 = n2

n2 = nth

count += 1

Output:

D. Write a function that reverses the user defined value.

def reverse_number(number):

reverse = 0:

while number > 0:

reminder = number % 10

reverse = (reverse * 10) + reminder

number = number

print("Reverse number is ", reverse)

reverse_number(1546)

Page | 2
Name:-Samruddhi Mali Roll no:-3131 Python Programming

E. Write a function to check the input value is Armstrong and also write the function for
Palindrome.

def armstrong(num):

sum=0

temp = num

while temp > 0:

digit = temp % 10

sum += digit ** 3

temp //= 10

if num == sum:

print(num,"is an Armstrong number")

else:

print(num,"is not an Armstrong number")


def palindrome(num):
n = num
rev = 0
while num != 0:
rev = rev * 10
rev = rev + int(num%10)
num = int(num / 10)
if n == rev:
print(n,"is palindrome number")
else:
print(n,"is not a palin")
num = int(input("Enter a number to chk it is armstrong or not: "))
armstrong(num)
num = int(input("Enter a number to chk it is palindrome or not: "))
palindrome(num)
Output:

Page | 3
Name:- Samruddhi Mali Roll no:-3131 Python Programming

F. Write a recursive function to print the factorial for a given number.

def recur_factorial(n):
if n == 1:
return n
else:
return n*recur_factorial(n-1)
num = int(input("Enter a number: "))
if num < 0:
print("Sorry, factorial does not exist for negative numbers")
elif num == 0:
print("The factorial of 0 is 1")
else:
print("The factorial of",num,"is",recur_factorial(num))
Output:

G) Write a program to display result based on below condition: If percentage <35-Failed

Percentage between35-50-Pass Class Percentage


between50-60 -Second Class Percentage between60-75 -
First Class Percentage >75-Distinction
Code:-

percentage = float(input("Enter your


percentage: ")) if percentage < 35:
result = "Failed"
elif 35 <= percentage <
50: result = "Pass Class"
elif 50 <= percentage <
60: result = "Second
Class"
elif 60 <= percentage <
75: result = "First Class"
else:
result = "Distinction"
Page | 4
Name:- Samruddhi Mali Roll no:-3131 Python Programming

print(f"Result: {result}")
Output:-

H) Write a program in python using if-else statement. Ask user to enter his age, if age<18 print “minor”
if age<65 print “Adult”
if age<100 print “senior citizen”.

-> CODE:
age = int(input("Enter your age: ")) if age < 18:
print("You are a minor.") elif age < 65:
print("You are an adult.") elif age < 100:
print("You are a senior citizen.") else:
print("You have entered an invalid age.")
OUTPUT:

I) Write a program in python to generate a table. Take input from the user by using For loop.
-> CODE:
num = int(input("Enter a number for the multiplication table: ")) terms =
int(input("Enter the number of terms for the table: "))
print(f"Multiplication table for {num} (up to {terms} terms):")
for i in range(1, terms + 1): result = num * i print(f"{num} x {i} = {result}")
OUTPUT:

Page | 5
Name:-Samruddhi Mali Roll no:-3131 Python Programming

J) Write a program in python to generate a table. Take input from the user by using While loop.

-> CODE:
num = int(input("Enter a number for the multiplication table: ")) terms =
int(input("Enter the number of terms for the table: "))
i=1
print(f"Multiplication table for {num} (up to {terms} terms):") while i <= terms:
result = num * i print(f"{num} x {i} = {result}") i += 1

OUTPUT:
H) Write a program to count even and odd numbers using for loop.

-> CODE:
start = int(input("Enter the start of the range: ")) end = int(input("Enter the
end of the range: ")) even_count = 0
odd_count = 0
for num in range(start, end + 1): if num % 2 == 0:
even_count += 1 else:
odd_count += 1
print(f"Number of even numbers: {even_count}") print(f"Number of odd
numbers: {odd_count}")
OUTPUT:

Page | 6
Name:- Samruddhi Mali Roll no:-3131 Python Programming

Practical no 2
A. Write a function that takes a character (i.e. a string of length 1) and returns True if it is a
vowel, False otherwise.

def find_vowel(s):

l = ["a", "e", "i", "o", "u"]

for i in s:

if i in l:

print("True")

else:

print("False")

s = "God is Great"

find_vowel(s)

Output:

B. Define a function that computes the length of a given list or string.

def len_s(s):

count = 0

for i in s:

if i != "":

count += 1

print("The total length of the string: ", count)


Page | 7
Name:-Samruddhi Mali Roll no:-3131 Python Programming

s = "God is great"

len_s(s)

Output:

C. Define a procedure histogram() that takes a list of integers and prints a histogram to the
screen. For example, histogram([4, 9, 7]) should print the following:

****

*******

***

******

def histogram(l1):

for i in l1:

print("*" * i)

l1 = [4, 7, 3, 5]

histogram(l1)

Output:

E) Create a function which displays result based on the below conditions: If percentage <35-Failed

Percentage between35-50-Pass Class Percentage between50-60 -Second Class


Percentage between60-75 -First Class Percentage >75-Distinction.
-> CODE:

def calculate_result(percentage): if percentage < 35:


return "Failed"
elif 35 <= percentage < 50: return "Pass Class"
elif 50 <= percentage < 60: return "Second Class"
elif 60 <= percentage < 75: return "First Class"
Page | 8
Name:-Samruddhi Mali Roll no:-3131 Python Programming

else:
return "Distinction"
user_percentage = float(input("Enter your percentage: ")) result =
calculate_result(user_percentage)
print(f"Result: {result}")

OUTPUT:

Write a program to make a simple calculator using function.


-> CODE:
def add(x, y):
return x + y def subtract(x, y):
return x - y def multiply(x, y):
return x * y def divide(x, y):
if y == 0:
return "Division by zero is not allowed."
return x / y
def calculator():
print("Select operation:")
print("1. Add")
print("2. Subtract")
print("3. Multiply")
print("4. Divide")
choice = input("Enter choice (1/2/3/4): ")
num1 = float(input("Enter first number: "))
num2 = float(input("Enter second number: "))
if choice == '1':
Page | 9
Name:- Samruddhi Mali Roll no:-3131 Python Programming

print("Result:", add(num1, num2))


elif choice == '2':
print("Result:", subtract(num1, num2))
elif choice == '3':
print("Result:", multiply(num1, num2))
elif choice == '4':
print("Result:", divide(num1, num2)) else:
print("Invalid input") calculator()
OUTPUT:

Page | 10
Name:- Samruddhi Mali Roll no:-3131 Python Programming

Practical no 3
A. A pangram is a sentence that contains all the letters of the English alphabet at least once, for
example: The quick brown fox jumps over the lazy dog. Your task here is to write a function to
check a sentence to see if it is a pangram or not.

import string, sys

if sys.version_info[0] < 3:

input = raw_input defispangram(sentence, alphabet=string.ascii_lowercase):

alphaset = set(alphabet)

return alphaset<= set(sentence.lower())

print ( ispangram(input('Sentence: ')) )

Output:

B. Take a list, say for example this one: a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] and write a program
that prints out all the elements of the list that are less than 5.

l1=[1,1,2,3,5,8,13,21,34,55,89]

l2=[]

for i in l1:

if i < 5:

l2.append(i)

print(l2)

Output:

Page | 11
Name:-Samruddhi Mali Roll no:-3131 Python Programming

Practical no 4
A. Write a program that takes two lists and returns True if they have at least one common
member

l1 = [1,2,3,4,5,6,]

l2 = [11, 12, 13, 14, 15, 6]

for i in l1:

for j in l2:

if i == j:

print("The 2 list have at least one common element")

Output:

B. Write a Python program to print a specified list after removing the 0th, 2nd, 4 th and 5th
elements.

l1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]

print("Original List is", l1)

print("According to question we have to remove 0th->1,2nd->3,4th->5,5th->6")

l1.remove(l1[0])

print("After Removal of 0th element Now List is", l1)

print("Now we have to remove 3 from list which is at 1th position of index")

l1.remove(l1[1])

print("After Removal of 1st element of New List (original 2nd index element) is", l1)

print("Now we have to remove 5 from list which is at 2nd position of index")

l1.remove(l1[2])

print("After Removal of 3rd element of New List (original 4th index element) is", l1)

print("Now we have to remove 6 from list which is at 2nd position of index")

l1.remove(l1[2])

print(l1)

Output:
Page | 12
Name:-Samruddhi Mali Roll no:-3131 Python Programming

C. Write a Python program to clone or copy a list

l1=[2, 4, 7, 8, 9, 0]

print ("Original List is", l1)

l2=l1

print ("Clone List is ",l2)

Output:

Class Codes

1. l1=[10,20,30,[50,60,[70,80]]]

print(l1[-1][-1][-1])

print(l1[3][2][1])

Output:

2. l1 = [10, 20, 30, [50, 60, ["python", "programming"]]]

print(l1[-1][-1][0], (l1[-1][-1][1]))

Output:

3.

t1 = (10, 20, 30, [40, 60, (80, 90, "Python")], 70)

py = t1[3][2][-1]

print(py[::2])

Page | 13
Name:-Samruddhi Mali Roll no:-3131 Python Programming

Output:

4.

t1 = (10, 20, 30, 40)

l1 = list(t1)

l1.append(50)

t1 = tuple(l1)

print(t1)

Output:

5.

t1 = (10, 20, 30, [40, 60], 70)

t1[3].insert(2, 90)

print(t1)

Output:

Page | 14
Name:-Samruddhi Mali Roll no:-3131 Python Programming

Practical no 5
A. Write a Python script to sort (ascending and descending) a dictionary by value.

released = {"Python 3.6": 2017, "Python 1.0": 2002, "Python 2.3": 2010}

for key, value in sorted(released.items()):

print(key, value)

Output:

Only keys sorted:

print (sorted(released))

Output:

B. Write a Python script to concatenate following dictionaries to create a new one. Sample
Dictionary : dic1={1:10, 2:20} dic2={3:30, 4:40} dic3={5:50,6:60}

Expected Result : {1: 10, 2: 20, 3: 30, 4: 40, 5: 50, 6: 60}

dic1 = {1: 10, 2: 20}

dic2 = {3: 30, 4: 40}

dic3 = {5: 50, 6: 60}

dic1.update(dic2)

print(dic1)

dic1.update(dic3)

print(dic1)

Output:

Page | 15
Name:-Samruddhi Mali Roll no:-3131 Python Programming

C. Write a Python program to sum all the items in a dictionary.


d = {"One": 10, "Two": 20, "Three": 30}

print(sum(d.values()))

Output:

Class Codes

1.

Galaxy_M35 = {

"Brand": "Samsung",

"OS": "Android 14",

("RAM", "memory"): (["6gb", "8gb"], ["128gb", "256gb"]),

"CPU_speed": "2.4hz",

"Camera ": "50MP",

print("Features of Samsung Galaxy M35 5G ", Galaxy_M35)

Output:

2.

bookmyShow = {

"Location": ["Mumbai", "Delhi", "Banglore"],

"Movie": ["Avengers", "Spiderman", "Batman"],

"Ticket Price": [100, 200, 300],

("Dates", "Place", "showTime"): (

[22, 23, 24],

["pvr", "cinemax"],

["10:00 AM", "12:00 PM", "2:00"],

),
Page | 16
Name:-Samruddhi Mali Roll no:-3131 Python Programming

"Seats": ["Platinum", "Gold"],

("ticket_charges", "Convenience_fees", "Sub_total"): [

"Gold:K-7,K-8",

47.20,

447.20,

],

print(bookmyShow)

Output:

Page | 17
Name:-Samruddhi Mali Roll no:-3131 Python Programming

Practical no 7
A. Design a class that store the information of student and display the same

class Student:
def __init__(self, name, sex, course, result):
self.name = name
self.sex = sex
self.course = course
self.result = result

def display(self):
print('Name:', self.name)
print('Sex:', self.sex)
print('Course:', self.course)
print('Result:', self.result)
student1 = Student("Alice", "Female", "Computer Science", "A")
student1.display()

Output:

B. Implement the concept of inheritance using python


class Shape:
author = 'Ashwin Mehta'
def __init__(self, x, y):
self.x = x
self.y = y
def area(self):
a = self.x * self.y
print('Area of a rectangle:', a)
print('Author:', self.author)
class Square(Shape):
def __init__(self, x):
super().__init__(x, x)
self.x = x
def area(self):
a = self.x * self.x
print('Area of a square:', a)
rectangle = Shape(5, 10)
rectangle.area()
square = Square(4)

Page | 18
Name:-Samruddhi Mali Roll no:-3131 Python Programming

square.area()

Output:

C. Create a class called Numbers, which has a single class attribute called MULTIPLIER, and a
constructor which takes the parameters x and y (these should all be numbers). i. Write a
method called add which returns the sum of the attributes x and y. ii. Write a class method
called multiply, which takes a single number parameter a and returns the product of a and
MULTIPLIER. iii. Write a static method called subtract, which takes two number parameters, b
and c, and returns b - c. iv. Write a method called value which returns a tuple containing the
values of x and y. Make this method into a property, and write a setter and a deleter for
manipulating the values of x and y.

class Numbers:
def __init__(self, x=0, y=0): # Corrected the constructor method name
self.x = x
self.y = y

def add(self):
return self.x + self.y # No need for parameters; use the instance variables

def multiply(self, x):


MULTIPLIER = 7.4
self.x = x
return self.x * MULTIPLIER

# Example usage
n3 = Numbers()
result_multiply = n3.multiply(4.78)
print("Multiplication Result:", result_multiply)

n2 = Numbers(5.7, 9.3) # Initialize with values


result_add = n2.add()
print("Addition Result:", result_add)
Output:

Page | 19
Name:-Samruddhi Mali Roll no:-3131 Python Programming

Practical no 9
A. Try to configure the widget with various options like: bg=”red”, family=”times”, size=18

import tkinter

from tkinter import *

root = Tk()

O = Canvas(root, bg="red", width=500, height=500)

O.pack()

n = Label(root, text="Hello World")

n.pack()

root.mainloop()

Output:

B. Try to change the widget type and configuration options to experiment with other widget
types like Message, Button, Entry, Checkbutton, Radiobutton, Scale etc.

from tkinter import *

root = Tk()

var = StringVar()

label = Message(root, textvariable=var, relief=RAISED)

var.set("Hey!? How are you doing?")

label.pack()

root.mainloop()

Page | 20
Name:-Samruddhi Mali Roll no:-3131 Python Programming

Output:

Button.py

import tkinter

from tkinter import messagebox

# Create the main application window

top = tkinter.Tk()

def helloCallBack():

messagebox.showinfo("Hello Python", "Hello World")

B = tkinter.Button(top, text="Hello", command=helloCallBack)

B.pack()

top.mainloop()

Output:

Entry.py

import tkinter as tk

top = tk.Tk()

L1 = tk.Label(top, text="User Name")


Page | 21
Name:-Samruddhi Mali Roll no:-3131 Python Programming

L1.pack(side=tk.LEFT)

E1 = tk.Entry(top, bd=5)

E1.pack(side=tk.RIGHT)

top.mainloop()

Output:

RadioButton.py

import tkinter as tk

def sel():

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

label.config(text=selection)

root = tk.Tk()

var = tk.IntVar()

R1 = tk.Radiobutton(root, text="Option 1", variable=var, value=1, command=sel)

R1.pack(anchor=tk.W)

R2 = tk.Radiobutton(root, text="Option 2", variable=var, value=2, command=sel)

R2.pack(anchor=tk.W)

R3 = tk.Radiobutton(root, text="Option 3", variable=var, value=3, command=sel)

R3.pack(anchor=tk.W)

label = tk.Label(root)

label.pack()

root.mainloop()

Outpt:

Page | 22
Name:-Samruddhi Mali Roll no:-3131 Python Programming

Page | 23
Name:-Samruddhi Mali Roll no:-3131 Python Programming

Extra Practical
1) Write a program to display result based on below condition:
If percentage 75-Distinction ,Percentage between35-50-Pass Class, Percentage
between50-60 -Second Class, Percentage between60-75 -First Class, Percentage >75-
Distinction
print("Enter the marks of five subjects: ")

C_programing = float (input ())


cpp = float (input ())
dbms = float (input ())
Java = float (input ())
python = float (input ())
total, average, percentage= None, None, None

total = C_programing+cpp+dbms+Java+python
average = total / 5.0
percentage = (total / 500.0) * 100

print("total mark =",total)


print("average =",average)
print("Percentage =",percentage)
OUTPUT:

2) simple calculator

Page | 24
Name:-Samruddhi Mali Roll no:-3131 Python Programming

CODE:
print("Enter any two number:")
num1 = float(input())
num2 = float(input())
print("value of",num1,"+",num2,"is",num1+num2)
print("value of",num1,"-",num2,"is",num1-num2)
print("value of",num1,"*",num2,"is",num1*num2)
print("value of",num1,"/",num2,"is",num1/num2)

Output:

Page | 25
Name:- Samruddhi Mali Roll no:-3131 Python Programming

1) if else statement
age = int(input("Enter your age:"))
if(age>18):print("Eligble for job") else:print("not
eligble for job")

Output:

1) If else elif statement percentage


percentage = float(input("enter your percentage :"))
if(100>=percentage>=75):print("A grade")
elif(75>percentage>=50):print("B grade")
elif(50>percentage>=35):print("C grade")
elif(35>percentage>=0):print("F grade")
else:print("wrong input!")

OUTPUT:

Page | 26
Name:-Samruddhi Mali Roll no:-3131 Python Programming

5)ticketboookingdiscountnestifelseaskrailwayemp30%else(ifelse{ask
for age (<18 25%|| senior citizen 65yrs 25% )} rest 5% dis)
CODE:
railway_emp = str(input("Are you railway employee or not [yes/no]:"))
if(railway_emp == "yes" ):
print("youget30%discount " :

-")
elif(railway_emp == "no"):
age = int(input("Enter ur age:"))
if(17<age & age<65):print("you get 5% dicount")
elif(0<age<18):print("you get 25% dicount")
elif(age<65):print("you get 25% dicount")
else:print("wrong input")
else:print("wrong input")

OUTPUT:

5) Function
CODE:
def Add(a,b):
sum= a+ b print(f"{a}+{b}={a+b}")
Add(10,20)

Output:

10) Class and object


class Person:

Page | 27
Name:-Samruddhi Mali Roll no:-3131 Python Programming

def init (self, name, sex, profession): self.name = name


self.sex = sex self.profession =
profession

def show(self):
print('Name:', self.name, '\nSex:', self.sex, '\nProfession:',
self.profession)
def work(self):
print(self.name, 'working as a', self.profession)
Pankaj= Person('Pankaj','Male','Full Stack Developer') Pankaj.show()
Pankaj.work()

OUTPUT:

Page | 28
Name:-Samruddhi Mali Roll no:-3131 Python Programming

11)
class Student:
def _init_(self,name,sex,course,result): self.name=name
self.sex=sex
self.course=course
self.result=result
def display(self,name,sex,course,result): self.name=name
self.sex=sex self.course=course
self.result=result print('name:' ,
name)
print('Sex:', sex) print('Course:', course)
print('Result:',result)
s1 =Student() s1.display('Pankaj','male','Bsc. IT','99.99%')
Output:

Page | 29
Python Programming

12) calculator

op = input("Enter operator:")
a = float(input("Enter 1st number:"))
b = float(input("Enter 2nd number:")) if(op == "+"):
print(a,'+',b,'=',a+b)
elif(op == "-"): print(a,'-',b,'=',a-b)
elif(op == "*"): print(a,'*',b,'=',a*b)
elif(op == "/"): print(a,'/',b,'=',a/b) else:print("Opps! Wrong Input!")

Output:

12) Match Statement

x = int(input("Enter the value of x: ")) match x:


case 0:
print("x is zero") case 69:
print("case is 4") case _ if
x!=106:
print("u r not 106") case _:
print("You are Legend")

Output:

Page | 30
Name:-Samruddhi Mali Roll no:-3131 Python Programming

12) KBC Mini


question = [
[

"Who is captian of Strawhat pirate?",


"Luffy","zoro","sanji","chopper","A"
],
[

"Which language is Pankaj's favorite one? ",


"C/C++", "Javascript", "Java", "CSS","C"

],
[

"What is my dream place? ",

"London", "Japan", "USA", "europe","B"

],
[
"Who is best course of the year?",
"BSCIT", "Bms", "Baf","Bmm","A"

PR_Piont = [ 40000,30000,20000,10000]

PR_Piont.sort()

for i in range(0 , len(question)):


sawal = question[i]
print(f"Question for {PR_Piont[i]} PR Point")
print(f"{i}. {question[i][0]}")

print(f"A. {question[i][1]} B. {question[i][2]}")

print(f"C. {question[i][3]} D. {question[i][4]}")


reply = input("Enter your answer:")

Page | 31
Name:-Samruddhi Mali Roll no:-3131 Python Programming

if(reply== question[i][-1]):

print(f"Congratulation you won {PR_Piont[i]} PR Point")


if(i == 4):
print(f"So the Best department is BSCIT")
else:

print("wrong Answer negative PR")


break

OUTPUT:

12) Write a program to display the use of Dictionary functions –

CODE:

(len(),any(),all(),sorted())
dic1 = { 1:"A", 3:"B",2:"C" }
print(len(dic1)) print(any(dic1))
print(all(dic1))
print(sorted(dic1))

Output:

12) Try to configure the widget with various option like


Page | 32
Name:-Samruddhi Mali Roll no:-3131 Python Programming

bg=’red’,size=18,family=’item’
CODE:

import tkinter as tk def

create_widget():
root = tk.Tk()

bg_color = "red" font_family =


"Times" font_size = 18

label = tk.Label(root, text="Hello, World!", bg=bg_color,


font=(font_family, font_size))
label.pack() root.mainloop()
create_widget()

Output:

12) Try to change the widget type and configuration options to experiment
with other widget types like Message, Button, Entry, Checkbutton,

Page | 33
Name:-Samruddhi Mali Roll no:-3131 Python Programming

Radiobutton, Scale, etc.

CODE:

import tkinter as tk

def create_widgets():
root = tk.Tk()

# Message Widget
message = tk.Message(root, text="This is a Message
Widget", width=200)
message.pack()

# Button Widget
button = tk.Button(root, text="Click Me",
command=lambda: print("Button clicked"))
button.pack()
# Entry Widget
entry = tk.Entry(root)
entry.pack()

# Checkbutton Widget
checkbutton = tk.Checkbutton(root, text="Check me")
checkbutton.pack()

# Radiobutton Widget
radio_var = tk.StringVar(value="Option 1")
radio1 = tk.Radiobutton(root, text="Option 1",
variable=radio_var, value="Option 1")
radio2 = tk.Radiobutton(root, text="Option 2",
variable=radio_var, value="Option 2")
radio1.pack()
radio2.pack()

# Scale Widget
scale = tk.Scale(root, from_=0, to=100,
orient=tk.HORIZONTAL)
scale.pack()

Page | 34
Name:-Samruddhi Mali Roll no:-3131 Python Programming

root.mainloop()

create_widgets()

Output:

Page | 35

You might also like