Share your repls and programming experiences

← Back to all posts
prime number generator
h
codeitfast

I decided, while on IDLE, to create a prime number generator. With this, you can find any prime number (as long as your computer is strong enough).


Please upvote!

Voters
userSM
HenryZelonka1
codeitfast
DynamicSquid
Comments
hotnewtop
CodeLongAndPros

Please add a function to give the total computation time.

codeitfast

@CodeLongAndPros Okay...Does python have a timer function?

codeitfast

@CodeLongAndPros nevermind, I'll use threading. 😁

CodeLongAndPros

@codeitfast You can use :

codeitfast

@CodeLongAndPros Ohhhhh. Fixed it!

CodeLongAndPros

Cool, but repl does not run your code on your computer. It runs it on repl's computers.

So even if I have a AMD threadripper, it will run the same speed as a Celeron.

codeitfast

@CodeLongAndPros I actually started this on IDLE. I was trying to find the millionth prime number, but my computer is REALLY slow :( . I decided to try it on repl.it, since, chances are, it is many computers threaded together, so I would think it would be faster.

codeitfast

@CodeLongAndPros what is an AMD threadripper? (I am new to repl.it and most coding aspects) Also, what is a Celeron?

CodeLongAndPros

@codeitfast They are processors (CPU's)

DynamicSquid

cool

codeitfast

@DynamicSquid Wow! how did you find this so quickly? I literally just posted this, and didn't go on the share chat!

codeitfast

@DynamicSquid Also, just wondering, on the chat feature, I noticed that repl.it said I only have 3 projects, and all of them aren't named. Do you have any idea of why that is?

DynamicSquid

@codeitfast I get bored sometimes, so I just keep refreshing the tab. Also what do you mean by chat feature and unnamed projects?

codeitfast

@DynamicSquid on the talk feature, when they say "+Add a post", they give you options of what repl you want to share. I already shared this one, so I thought it would be possible to add to the chat.

codeitfast

@DynamicSquid but the only options that they gave were things like "TechnoVirusTree" or "RoundInvolvedPackage", which are some of my non-named projects.

DynamicSquid

@codeitfast you have to search your projects up

codeitfast

@DynamicSquid oh...Just saw it 😳