Welcome to my Coding Resources Page
Core4 | Definition | Example | Try It in Trinket |
Variables | store data and give them names,including numbers, strings and Booleans. | Variable Try It | |
Conditionals | a statement that is true IF something else is true: an If...Then statement | Conditional Try It | |
Loops | code that repeats for a certain number of times, or while something is true | Loops Try It | |
Functions | Reusable Code: If you find yourself doing something more than once, make it a function | Functions Try It |
#GPA calculator math = int(input("What's your grade in math?\n")) science = int(input("What's your grade in science?\n")) history = int(input("What's your grade in history?\n")) english = int(input("What's your grade in english?\n")) average=(math + science + history + english)/4 print ("Your average is ") + str(average)