Share your repls and programming experiences

← Back to all posts
Random Number Generator
HarveyH (205)

A basic number generator with built in error messages to stop you having to restart the software.

Here is a list of versions:
https://repl.it/@HarveyH/Random-Number-Generator-v101
https://repl.it/@HarveyH/Random-Number-Generator

Comments
hotnewtop
Pepper100 (10)

Hi, I am making a random number generator! Mine was failing at the ranint function. I looked up some random number generators to see where I was going wrong and came across yours. I looked in your code to see how close it was to mine, and your randint command was the same as mine, but with different variables. Please can you take a look at my code and see where I went wrong. https://repl.it/@Pepper100/Random-Number-Generator-2#main.py
Cheers, Pepper100.
P.s. line 10 to 29 is novelty text, it serves no purpose, but is there for novelty.

HarveyH (205)

@Pepper100 I'm assuming someone has already fixed it for you because it seems to work great, but I am glad that you are learning! Nice piece of code and thank you for asking on here.

Pepper100 (10)

Thank you,@HarveyH someone has fixed it for me, i was using my Randint function and my variables were strings not integers, I didn’t know they were things, so I am learning! Thank you anyway!

k4t3xpl0si0n (6)

Why is this long program needed when the use of the random module could make this even simpler. If you made a random number generator without the random module it would be impressive. But this is just unnecessary chicken scratch

HarveyH (205)

@k4t3xpl0si0n So what am I using, because in the first line u say I'm not using random number generator, but in the next, you pretty much say I do?

HarveyH (205)

@k4t3xpl0si0n Besides, it was just a bit fun.

k4t3xpl0si0n (6)

@HarveyH In the second line I stated "If you made a random number generator WITHOUT the random module it'd be impressive. The first line stated that your random number generator isn't required to generate random numbers in the first place.