The Absolute Basics of a Programming Language
When you’re learning a programming language, you’ll be overwhelmed with all the new information that you’re taking in. More often than not, you’ll be lost, and not knowing how far you’ve made into learning the basics of a programming language.
This checklist will help you keep track of your progress while learning an imperative programming language (like C, C++, Java, Python, PHP, Perl, JavaScript and a myriad of other languages).
Basic I/O
- How to output text
- Declaring variables
- Storing strings in variables
- Taking input from the user
- Storing input in a variable
- Output contents of a variable
Basic Datatypes
- Create a string variable
- Create an integer variable
- Create a floating point variable
- Print strings, integers, and floating point numbers
Conditional Statements
- Learn about TRUE and FALSE, Boolean datatype
- Learn about the following operators
- Less than
- Less than or equals to
- Greater than
- Greater than or equals to
- Equals to
- Not equals to
- Execute a statement when a condition is true
- Execute two statements when a condition is true
- Execute either of two statements depending on whether the condition is true or false
- Take user input, and execute a statement depending on a condition involving the input
Control Structures
- Execute a statement three times
- Execute a statement three times without writing the statement three times
- Execute a statement multiple times with minor, incremental changes to it
- Execute a statement N times, with N being input from a user
- Execute a statement N times, with N being the input, and with minor incremental changes
Arrays (or) Lists
- Create an array with three numbers
- Access an element in the array and output it
- Change an element in an array and output it (if the language allows you to)
- Output all the elements of an array
- Output every other element of an array
- Find the additive sum of all elements of an array
- Add a number to all elements of an array
- Take multiple inputs from the user and store it in an array
- Write an array that contains arrays as elements
Functions
- Write a function and call it three times
- Write a function that takes a parameter and call it three times with different argument values
- Write a function that takes a string, and a number N as inputs AND outputs the string N times
- Write a function that returns a value and doesn’t output anything directly
- Write a function that takes an array
- Write a function that returns an array
- Write a function that calls itself (recursive function)