Prime Numbers Checker, Prime Factors using (Python GUI + backEnd + Main)
Prime Factors of Prime Numbers Checker
This picture shows all the codes are gonna be executed here, thus making this our main file.
The highlighted word "import" depicts that we are gonna import a module or a file, this allows us to be able to crossover between files easily.
The second picture shows the front part of our activity, it is the design or the layout.
We can see that I also imported something here, "from tkinter import*" this simply means that from the given module or the stated module which is "tkinter" we are importing all which the "*" stands for.
A Class is like an object constructor, or a "blueprint" for creating objects, here I made a class which name is "primeNumber" so that we can group all the objects inside it.
The "def" is what we call a function in python. A function is a block of code which only runs when it is called. We can also pass data in a function and they are known as parameters, a function can also return data as a result.
The last picture is the hidden side of our program.
It is like the brain in which all the functions are here, where the operations works, how the data are being managed and where to pass them. In this picture, I created a function named "primeBut" and a parameter "n" so that i can pass the value there. To put it short this function detects an inputted number if it is a prime number and will list all of its prime factors.
This is just an assignment that our prof gave to us, I hope it can help you! Leave a comment and tell me if it helps! Thank you!
..
ReplyDeleteThanks. It helped alot!
ReplyDeleteThank you bro
ReplyDelete