Skip to content

Instantly share code, notes, and snippets.

@chiefspace
chiefspace / fizzbuzzba1.py
Created June 30, 2016 04:21
fizzbuzzba1.py
import sys
if len(sys.argv) <= 1 or (not isinstance( sys.argv[1], int )):
print ("You didn't enter a limit as an argument to the fizzbuzz program")
while True:
try:
my_input = int(input("Enter a numerical limit: "))
break
except (NameError, TypeError):
print("Oops! That was no valid number. Try again...")
# Download and Install the Latest Updates for the OS
apt-get update && apt-get upgrade -y
# Set the Server Timezone to EST
echo "America/New_York" > /etc/timezone
dpkg-reconfigure -f noninteractive tzdata
# Enable Ubuntu Firewall and allow SSH & MySQL Ports
ufw enable
ufw allow 22