Using PYTHON: Function takes the width as a positive integer and returns the width of the row as a string. Each character has a 5/6 chance to be one of the movement symbols, (MOVEMENT_SYMBOLS = '>
Using PYTHON: Function takes the width as a positive integer and returns the width of the row as a string. Each character has a 5/6 chance to be one of the movement symbols, (MOVEMENT_SYMBOLS = '><v^'), and 1/6 chance to be an empty symbol (EMPTY_SYMBOL = '.').
* not able to use random.choice or lists, please use random.randint and/or random.random only
random in python:-
A random number generator is a computational or physical device designed to generate a sequence of numbers or symbols that can not be reasonably predicted better than by a random chance. Random number generators can be true hardware random-number generators (HRNG), which generate genuinely unpredictable results, or pseudo-random number generators (PRNG), which generate results that look random, but are actually deterministic, and can be reproduced if the seed to the PRNG is known.
Step by step
Solved in 3 steps with 1 images