Python random numbers 🎲

preview_player
Показать описание
Python random numbers module tutorial explained

#python #random #numbers

import random

myList = ['rock','paper','scissors']

cards = [1,2,3,4,5,6,7,8,9,"J","Q","K","A"]

print(cards)

––––––––––––––––––––––––––––––
Creative Commons — Attribution-ShareAlike 3.0 Unported— CC BY-SA 3.0
––––––––––––––––––––––––––––––
Рекомендации по теме
Комментарии
Автор

import random

x = random.randint(1, 6)
y = random.random()

myList = ['rock', 'paper', 'scissors']
z = random.choice(myList)

cards = [1, 2, 3, 4, 5, 6, 7, 8, 9, "J", "Q", "K", "A"]

random.shuffle(cards)

print(cards)

BroCodez
Автор

His videos are short,
Straight to the point
and very helpful.

sanandreasplayboi
Автор

You are really good at doing this. Keep it going

aminafzali
Автор

you KNOW how to deliver a subject.

GOOD JOB, Thank you

cozycubix
Автор

These are pretty useful methods of the Python random module, it helped me a lot, thank you, Sir!

hongyingke
Автор

I'm so happy I found your channel!

bec_liv
Автор

wow. short and precise, yet very effective.

Owojama
Автор

Not just this, but every videos are broooo.

irpiyaprach
Автор

Thank you Bro for your awesome lessons! It is really useful

kiki.t
Автор

Thank you bro✊👊 you’re making our journey a lot more easier 😰🤗

pavelkolev
Автор

Standard card deck don't have 1's in it 😉 But it doesn't really matter for this example.
Thank you so much for all your vidoes, I just started to learn and feel really good while watching your videos 🙏

Olfis
Автор

He makes things look ordinary so that it becomes easier to understand

sanandreasplayboi
Автор

i tried to make a rock, paper, scissor game. i just finished, it's janky, but kinda works. i'll check on the next videos how making the rps game would look like. haha

FuelledByKanin