This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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...") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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 |