What did I learn?
- Programming terms learned today:
- Function - An event that performs a certain order of tasks and has a given name. It can be used throughout the program and some functions are already built into Python, like the print function.
- Argument - This is a value that is passed to a function through the parenthesis.
- String - A data type that is a sequence of characters. You can not do math oporations on this but you can convert Strings into integers.
- Variable - A container that holds some kind of data, can be a math data type like integers or strings, and is given a name. Variables can be called to use throughout the program after they have been declared.
- Integer - A data type that can only be a whole number. You can do math oporations on this data type.
- Why do you need to keep track of your data types?
- If you don't keep track of your data type you may try to do an oporation with one that is not allowed. For example, you may try to multiply the intiger "5" with the string "bob". Python will throw and error because it is impossible to multiple that out.
Check out my Python script here!