Need Python Script Help

Status
This thread has been locked.

Debaucus

Premium
Feedback score
-1
Posts
348
Reactions
209
Resources
0
I need a small script which loops between 2 numbers that prints out all the results to a text file.

If you can do this let me know, I have a python script iep to run it.
 
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

Lord Flo

Supreme
Feedback score
18
Posts
567
Reactions
329
Resources
0
Hi,

not sure if this is what you're looking for but this script creates random numbers between two integers and saves them in a text file:

Code:
import random
start = 0 # replace this with your start integer
end = 10 # replace this with your end integer
file = open("Output.txt", "w")
while True:
    number = random.choice(start, end)
    print("Random Number: {}".format(number))
    file.write(number)

This should work, just quickly written out of my mind.

I hope I was able to help you!

Best regards,
Bastian
 
Status
This thread has been locked.
Top