GoConqr has a new look! Let us know what you think.

Mind map

Chapter 1 – Programming Basics

Daniel Mapplebeck Computing A level English

Map content

Chapter 1 – Programming Basics

  1. Input/output Statements

    • Input statement allows the user to enter data
      • Eg. USERINPUT
    • Output statement allows the program to display/print data
      • Eg. OUTPUT
  2. Comments

    • Used to show what each bit of the code does, documenting who made it, the time and date of creation/last revision etc.
    • Shown using a #
  3. Data Types

    • Integer - a whole number Eg. -25, 0, 3, 54842
    • Boolean - a variable that can only be TRUE or FALSE
    • Character = a letter, number or special character that is represented in ASCII. Eg. A, ?, 4
    • String = anything enclosed in speech marks. Eg. "Dan"
    • Real/Float - a number with a fractional part Eg. -13.5, 0.0, 3.142
  4. Common Arithmetic Operators

    • -,+,* and / are common arithmetic operators
      • Used in most programming languages and pseudocode
  5. Exponentiation

    • To find a square of a number (eg. 25) you need to use exponentiation
      • In pseudocode written as x ← y**n
  6. Finding a Remainder

    • Found using the mod function – written % in python
      • Returns just the remainder
      • Eg. 20%3 = 2 i.e. the remainder is 2.
  7. Integer Division

    • Found using the div function – written // in python
      • Eg. 20//3 = 6
  8. String Handling Functions

    • Concatenating Strings
      • To concatenate means to join two strings together
        • Use the + operater to do this
        • Eg. "Johnny" + "Bates" = "JohnnyBates"
    • String Conversion Operations
      • int("1")|Converts a character to an integer. Eg. "1" would become 1
      • float("123.456")|Converts a string to a real number. Eg. "123.456" would become 123.456
      • str(123.456)|Converts a real number to a string. Eg. 123.456 would become "123.456"
      • date(year,month,day)|Returns a number that you can use to calculate with. i.e turn into a string.
      • str(123)|Converts a integer to a string. Eg. 123 would become "123"
    • Constants
      • Constants are values that never change throughout the program
        • Makes is so the programmer cannot accidentally change the data
    • Variables
      • Variables are identifiers (ie. Names) given to data that can change throughout the program
        • Names should be meaningful to the data contained
          • Easier for other programmers and you to follow and make changes
    • Some programming laguages require that you declare the varables and constants you want to use in your program before you can use them in the program.

Information

Description
A level Computing (3.1) Mind Map on Chapter 1 – Programming Basics, created by Daniel Mapplebeck on 09/03/2017.
Views
2
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?