From 50a4221a094779d5bc4b6b9a99f7df6d485d3f13 Mon Sep 17 00:00:00 2001 From: Ken Schaefer Date: Mon, 27 Nov 2023 16:21:25 -0600 Subject: [PATCH] day 04 --- day-04/coin_toss.py | 7 +++++++ day-04/lists_example.py | 2 ++ day-04/random_example.py | 4 ++++ 3 files changed, 13 insertions(+) create mode 100644 day-04/coin_toss.py create mode 100644 day-04/lists_example.py create mode 100644 day-04/random_example.py diff --git a/day-04/coin_toss.py b/day-04/coin_toss.py new file mode 100644 index 0000000..4f46cf7 --- /dev/null +++ b/day-04/coin_toss.py @@ -0,0 +1,7 @@ +import random + +side = random.randint(0, 1) +if (side == 1): + print("Heads") +else: + print("Tails") \ No newline at end of file diff --git a/day-04/lists_example.py b/day-04/lists_example.py new file mode 100644 index 0000000..b3d3e91 --- /dev/null +++ b/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"] + diff --git a/day-04/random_example.py b/day-04/random_example.py new file mode 100644 index 0000000..142a64a --- /dev/null +++ b/day-04/random_example.py @@ -0,0 +1,4 @@ +import random + +random_integer = random.randint(1, 10) +print(random_integer) \ No newline at end of file