Generate random numbers in Python 🎲

Published: 12 November 2022
on channel: Bro Code
143,514
3.3k

#python #tutorial #course

Python random module tutorial example explained

00:00:00 random module
00:04:32 number guessing game

import random

low = 1
high = 20
options = ['Rock', 'Paper', ‘Scissors’]
cards = ['2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K', 'A']

#number = random.random()
#number = random.randint(1, 6)
#number = random.randint(low, high)
#choice = random.choice(options)
#random.shuffle(cards)


On this page of the site you can watch the video online Generate random numbers in Python 🎲 with a duration of hours minute second in good quality, which was uploaded by the user Bro Code 12 November 2022, share the link with friends and acquaintances, this video has already been watched 143,514 times on youtube and it was liked by 3.3 thousand viewers. Enjoy your viewing!