Loading article...
Loading article...
Stream/Area:
-
Subject:
-
Paper ID:
10.55041/IJSREM23029
Volume:
7 |
6 |
Jun 2023
Pages:
Publication Frequency:
Monthly (12 issues per year)
License:International Journal of Scientific Research in Engineering and Management follows the Creative Commons Attribution 4.0 (CC BY 4.0) License, allowing free use and distribution with proper attribution.
In this project, we use Pygame, a Python library used for creating games and multimedia applications to visualize bubble sort algorithm (a simple sorting algorithm). The user have to press a space bar key to start the sorting process when the pygame application is started. This has to be done when a set of unsorted bars with different heights is displayed on the screen. Steps to create the visualization. A set of random numbers is generated and are represented as bars on the screen. Bars of different heights and colors are drawn using Pygame Once the bars are drawn, we can begin the sorting process. We will use the Bubble Sort algorithm to compare adjacent elements and swap them if they are in the wrong order. To visualize this process, we will update the position of the bars on the screen to reflect the new order of the elements where each bar represents an array which has to be sorted. Process of sorting is shown and the users can see the bars moving up and down as elements get sorted .A message will be displayed on the screen when the sorting process is completed. User now can restart the process with a new set of random numbers by pressing a button. In summary, this project will use PyGame to create a visualization of the Bubble Sort algorithm. The user will be able to see the unsorted bars on the screen and initiate the sorting process by pressing a button. As the algorithm progresses, the position of the bars will be updated to reflect the new order of the elements. This project will provide a fun and interactive way for users to learn about the Bubble Sort algorithm and how it works.
KEYWORDS
Publication Date
7/5/2023
Peer Review Type
Double-Blind Peer Review
Review Rounds: 2
Documents
Article Views
0
Total views since publication
PDF Downloads
5
Total downloads since publication
Geographic Reach
5
Digital Preservation: This article is permanently archived on Zenodo and complies with all data preservation standards across major indexing platforms.
Plagiarism Screening
This manuscript has been checked for plagiarism using TurnitinPlagiarismChecker software.
Conflict of Interest
The authors declare no conflict of interest related to this research work.
Funding Information
No funding information available for this research.
Related research in the same subject area
Loading similar articles...