- Published on
Python Coding Challenge 1
- Authors
- Name
- Zach Hutton
- @ZachHutton99
Requirements
The goal of this challenge is to generate the largest non-repeating output in the shortest amount of file size. My solution is capable of printing around 1659312657 non-repeating numbers, see what you can come up with before viewing the solution below.
Checking File size
Windows
- Right click the selected file.
- Select properties from the dropdown list
- View the file size listed under Size
Mac
- Right click the selected file.
- Select Get Info from the dropdown list
- View the file size listed under Size or at the top right corner of the menu.
Post your Solutions in the Comments
This can be done in different programming languages to achieve better, or worse results. Comment your solution below and what the final file size was.
Spoiler
My solution is posted below, do not continue unless you want the solution to be spoiled.
Solution
I used time.time() so that my number is constantly getting larger and larger while still keeping a small file size.
import time
if __name__ in '__main__':
for i in range(int(time.time())):
print(i)