Programming Basics/Printable version
| This is the print version of Programming Basics
You won't see this message or any elements not part of the book's content when you print or preview this page.
Concepts[edit | edit source]
- What is programming?
- What is an algorithm?
- What is coding?
- What is a programming language?
- What is a translator?
Variables are tools which are used to store data.
Programming languages often use types to distinguish different kinds of data stored in variables.
|Data Type||Description||Example 1||Example 2||Example 3|
|Integer||Any whole number.||1||300||48|
|Character||A letter of the alphabet.||a||z||y|
|String||A collection of text||Wikibooks||Programming Basics||Hello world!|
Functions used to store code that is used multiple times throughout a program, especially bits of code that repeat throughout a program.
Functions often take input to make them more versatile. This input is called an argument.
Conditions are used in programming to only do something in the event of something else. This is incredibly useful in a number of tasks.
For example, one might prevent divide by zero errors by check to make sure the devisor is not zero first, and then only dividing if the devisor is not zero.
Loops are used to repeat sections of code, either infinitely, or until a condition is met.
There are two common types of loops, While loops and For loops.
Arrays are used to hold multiple related variables.
A string is a data type used to store sequences of characters. Strings are often simply an array of characters.
Files are used to save data to a storage device, which is useful for a number of purposes.
| This page or section is an undeveloped draft or outline.
You can help to develop the work, or you can ask for assistance in the project room.