Code a Coinflip in Python!
Channel:
Subscribers:
265
Published on ● Video Link: https://www.youtube.com/watch?v=7ruNt4KRtro
ez stuff
CODE:
#Method 1
#bring in random mod
import random
#instructions
print("Heads is 1")
#instructions
print("Tails is 2")
#print random number from 1 to 2
print("Your result is", random.randint(1,2))
#Method 2 (Better)
#bring in random mod
import random
#create word list (result is the variable of the list)
result=("Heads", "Tails")
#print a random word from the list
print("Your result is", random.choice(result))
Other Videos By JakeDaSpud
2021-06-18 | RANKING the NEW AMONG US COLOURS |
2021-05-19 | failing to fix my ps vita :( |
2021-05-02 | i am FINALLY done with this |
2021-02-24 | haha rage game make you rage |
2021-01-09 | alright getting a little more annoying |
2021-01-05 | very much possible |
2020-12-15 | bro just sneeze wtf - FINALE |
2020-11-29 | WHEN WILL IT END |
2020-11-22 | WOAH WHY'D IT GET HARD NOW |
2020-11-17 | I AM ABSOLUTE gOD |
2020-11-04 | Code a Coinflip in Python! |
2020-10-27 | #3 Ulysses Farm (.artfol) |
2020-10-25 | #2 portal (.artfol) |
2020-10-18 | #1 house (.artfol) |
2020-09-07 | MY BEST GAME OF ARSENAL |
2020-09-07 | gopro man is trapped |
2020-09-07 | gopro white (supremacy edition) |
2020-08-16 | 64GB SD CARD UNBOXING (TOO EXCITING) |
2020-08-15 | Super Mario Odyssey Ep 7: The Finale! |
2020-02-15 | Super Mario Odyssey Ep 6: Shinto Shrine Desk Slam |
2020-02-15 | Super Mario Odyssey Ep 5: The DARK SOULS Mario Level |
Tags:
Python
Code
Coding
Coin
Flip
Coinflip
Basic
Beginner