exercise 1: Write a GUI python program that mimics the above GUI layout where the user can enter
his information: full name (all must be string), ID (10 digits), Phone number (10 digits
should start with 05), GPA (from 0 - 5), Dept (radio buttons), and the destination file where
these information should be stored.
When the user hits Open, the File Dialog should handle this event and the user selects
the file where the user wants to save this information such as C:/home/user/data.txt
Finally, the user hits Submit, the program saves this information into the selected file, and
clears out all the input fields for the next user.
Note: the application should enforce all the data types such as the id should be 10 digits;if the user enters 9 digits, the application should display an error message and does notsubmit this information to the file until the user fixes all the problems.
Note: the application should enforce all the data types such as the id should be 10 digits;
if the user enters 9 digits, the application should display an error message and does not
submit this information to the file until the user fixes all the problems.
Exercise 2:Download several random images (5-7 images) and save them into a folder. To makeyour life easier, all these images should have identical width*height (for example:512*512) and all should be .pngYou can use this website to play around with your images:https://convert-my-image.com/mageConverterWrite a GUI python program that mimics the above GUI layout where the user can selectthe folder where the images are stored. Then, the first image in the folder will bedisplayed. When the user hits Next, it should display the next image and so on. When theuser hits Back, it should display the previous image and so on. The program shoulddisplay a message "There is no more image" when the user reaches the end and hitsNext or in the beginning and hits Back.Hint: use the following function to get all the files inside a folder as a list.import osdef getList (folderPath):return os.listdir (folderPath)
Exercise 2:
Download several random images (5-7 images) and save them into a folder. To make
your life easier, all these images should have identical width*height (for example:
512*512) and all should be .png
You can use this website to play around with your images:
https://convert-my-image.com/mageConverter
Write a GUI python program that mimics the above GUI layout where the user can select
the folder where the images are stored. Then, the first image in the folder will be
displayed. When the user hits Next, it should display the next image and so on. When the
user hits Back, it should display the previous image and so on. The program should
display a message "There is no more image" when the user reaches the end and hits
Next or in the beginning and hits Back.
Hint: use the following function to get all the files inside a folder as a list.
import os
def getList (folderPath):
return os.listdir (folderPath)
جامعة الملك لديد King Bad IS324 - Spring 2022 Lab - 6 GUI LAB OBJECTIVES: • Understand the basic tkinter widgets. • Develop GUI python applications Exercise 1: Internship Form Full Nam e Phon SHA Dept IS CS SE File to be saved Write a GUI python program that mimics the above GUI layout where the user can enter his information: full name (all must be string), ID (10 digits). Phone number (10 digits should start with 05), GPA (from 0-5), Dept (radio buttons), and the destination file where these information should be stored. When the user hits Open, the File Dialog should handle this event and the user selects the file where the user wants to save this information such as C/home/user/data.txt Finally, the user hits Submit the program saves this information into the selected file, and clears out all the input fields for the next user.
Note: the application should enforce all the data types such as the id should be 10 digits: if the user enters 9 digits, the application should display an error message and does not submit this information to the file until the user fixes all the problems. Exercise 2: Download several random images (5-7 images) and save them into a folder. To make your life easier, all these images should have identical width"height (for example: 512*512) and all should be png You can use this website to play around with your images: https://convert-my-image.com/ImageConverter My Image Gallery the folder Select O Write a GUI python program that mimics the above GUI layout where the user can select the folder where the images are stored. Then, the first image in the folder will be displayed. When the user hits Next, it should display the next image and so on. When the user hits Back, it should display the previous image and so on. The program should display a message "There is no more image when the user reaches the end and hits Next or in the beginning and hits Back. Hint: use the following function to get all the files inside a folder as a list. import os def getList(folderPath): return os.listdir(folderPath)
exercise 1: Write a GUI python program that mimics the above GUI layout where the user can enter his information: full n
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am