Question
5. a) Using Python tkinter module, create the following GUI page to accept username and password from the user. The page should have two labels
5.
a) Using Python tkinter module, create the following GUI page to accept username and password from the user.
The page should have two labels i.e. Username and Password along with entry boxes. The password should be displayed as * instead of character while typing. A submit button should be placed after the two labels as shown in Fig. below. After the user enters Username, Password and clicks submit, username and password should be displayed on the Python interpreter (>>>).
b) Illustrate the use of Radiobox widget in Python tkinter module with example of selecting between the following:
Low, Medium, High
Display the selected option in the GUI window.
6.
a) Why is searching operation required in programming? Give at least five examples where sorting can help. Explain Linear Search and binary search along with examples. Write Recursive and Iterative Python programs for Binary Search. Suppose a list contains elements [8, 12, 5,10 ,19, 20, 25, 34, 33]. Illustrate the steps to find element 34 using the binary search technique.
b) Write a Python program for sorting a given set of numbers using Selection sort. Illustrate the working of selection sort on the following set of numbers [24, 82, 59, 12, 22, 36, 41, 28]. What is the time complexity of Selection sort. Also write the complexity for number of swaps in best case and worst case for selection sort.
7.
What is NumPy? Explain in brief its usability and characteristics, what different packages of python are built using NumPy?
PEC Username Password Submit X
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started