And that’s wrap for day 4, today I looked briefly at modules and mostly the random module to pick random things from lists or to get random numbers. In the end I created a Rock Paper Scissors game that can be found here.
Woop woop the coding for day 4 of my #100daysofcode with #Python is done. Today we got to play with lists and the random module. If you want to play my rock paper scissors game you can do it here: https://t.co/6LfYGTtorL #vCommunity
— Wouter Kursten (@Magneet_nl) January 7, 2021
modules import modulename import random info: print(help(random)) print(dir(random)) from: https://stackoverflow.com/questions/5103329/how-to-find-out-what-methods-properties-etc-a-python-module-possesses random documentation: https://www.askpython.com/python-modules/python-random-module-generate-random-numbers-sequences random_float= random.random() always between 0 an 1 multiple by something to get bigger numbers lists data structure random.choice(variable) to get random item from list use variable to get the offset for the item in a list 0 for the first one negative is for starting from the end split breaks up string into list