These are a few habits I've picked up from college and from the workforce that have been instrumental in elevating my coding to the next level!
In this video we will cover functions, comments, and structure logic for starting out EVERY PROGRAM!
I use the code in this video as a copy paste template to start nearly all of my programs, feel free to do the same!
COPY PASTE TEMPLATE:
===============================================
linebreak = '\n'*2
title = '='*100
Start Function, Provides a visual point of start
def start():
global linebreak
global title
print('Starting program...' + linebreak + title)
input(linebreak + 'Press Enter to Continue...' + linebreak)
Mainline Logic, Command center to call all other functions
def main():
global linebreak
global title
print(linebreak + 'Hello!' + linebreak)
Start Condintion, starting point in the code
if '__start__':
start()
main()
==============================================
Timecodes
00:00 Intro
00:34 Functions and mainline logic
02:44 Variables
04:06 Using global variables
05:05 Getting user input
06:30 Running our code!
06:49 Commenting and revision
10:01 Outro