Skip to main content
Post Undeleted by ElPedro
added 51 characters in body
Source Link
ElPedro
  • 6.5k
  • 2
  • 26
  • 39

Pyth, 66 7 bytes

WQ=OQQQWQ=OQQ 

Try it online!Try it online!

+1 to print the initial input value.

While Q is truthy, set Q to be a random integer between 0 and Q and print Q.

Not the shortest Pyth answer but I'm just learning and only posting because of the recent discussion about no-one using Pyth any more :)

Pyth, 6 bytes

WQ=OQQ 

Try it online!

While Q is truthy, set Q to be a random integer between 0 and Q and print Q.

Not the shortest Pyth answer but I'm just learning and only posting because of the recent discussion about no-one using Pyth any more :)

Pyth, 6 7 bytes

QWQ=OQQ 

Try it online!

+1 to print the initial input value.

While Q is truthy, set Q to be a random integer between 0 and Q and print Q.

Not the shortest Pyth answer but I'm just learning and only posting because of the recent discussion about no-one using Pyth any more :)

Post Deleted by ElPedro
Source Link
ElPedro
  • 6.5k
  • 2
  • 26
  • 39

Pyth, 6 bytes

WQ=OQQ 

Try it online!

While Q is truthy, set Q to be a random integer between 0 and Q and print Q.

Not the shortest Pyth answer but I'm just learning and only posting because of the recent discussion about no-one using Pyth any more :)