Upload
Public Pastes
About
Lulzbin Drive [LulzDrive]
a
num1 =int(input("Please enter the start of the range: ")) num2 =int(input("Please enter the end of the range: ")) print("Prime number(s) in the range is/are:", end=" ") """ not sure why i put primegen as a function there but it was supposed to be drastically different like a dynam list (turns out i shouldnt do all of that just for printing primes to stdout) -ev (delete this if you want but to prevent the teacher from thinking that someone else wrote it its good to add some sort of fake learning bullshit like - todo: prime numbers or some shit) """ pn = [] def primegen(): for thenumbersbaby in range(num1, num2 + 1): flv = 0 if thenumbersbaby < 2: continue if thenumbersbaby == 2: pn.append(2) continue for v in range(2, thenumbersbaby): if thenumbersbaby % v == 0: flv = 1 break if flv == 0: pn.append(thenumbersbaby) pntstdo = str(pn)[1:-1] print(pntstdo+".") primegen()
Uploaded on 2022/10/23 8:34:11