guys! So, I just recently started getting into programming by starting with python, and I’m currently working on a password generator for myself; I’m starting off by writing a program to generate prime numbers to use when calculating RSA, and I found this one set of code that I modified to display results through popups via PySimpleGUI. However, I’m having trouble with getting all my results on one popup window.
Here’s my code so far:
import PySimpleGUI as sg
start = int(sg.popup_get_text("Enter the start of the range: " ))
end = int(sg.popup_get_text("Enter the end of the range: "))
for num in range(start, end + 1):
if num > 1:
for i in range(2, int(num**0.5) + 1):
if(num % i) == 0:
break
else:
sg.popup(num)
sg.popup("The process is complete. Press OK to close.")
So, how do I get all results to be displayed on one popup window?
user26149746 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.