Browse Source

day 04

master
Ken Schaefer 12 months ago
parent
commit
50a4221a09
  1. 7
      day-04/coin_toss.py
  2. 2
      day-04/lists_example.py
  3. 4
      day-04/random_example.py

7
day-04/coin_toss.py

@ -0,0 +1,7 @@
import random
side = random.randint(0, 1)
if (side == 1):
print("Heads")
else:
print("Tails")

2
day-04/lists_example.py

@ -0,0 +1,2 @@
states = ["Delaware", "Pennsylvania", "New Jersey", "Georgia", "Connecticut", "Massachusetts", "Maryland", "South Carolina", "New Hampshire", "Virginia", "New York", "North Corolina", "Rhode Island"]

4
day-04/random_example.py

@ -0,0 +1,4 @@
import random
random_integer = random.randint(1, 10)
print(random_integer)
Loading…
Cancel
Save