Programming Tools and Terms
High Level Languages = python, java
Machine Code = 1s and 0s
Variables:
-static = doesn't change
-dynamic = moving
-global = entire programme
-local = only in function
Constants = gravity, speed of light
Data Types:
-real number = any number (5, 6.2, -71)
-integer=3
-character= m(male) or f(female)
-string= hello
-boolean
-float=6.2
Translators
-Compilers= goes through code and when finds error, stops
-Interpreters= goes through 1 line of code at a time
-Assemblers=not high level-simpler, goes to machine code
Types of Errors
-Syntax= written code, spelling, punctuation, lower/upper case
-Run= divide0, run out of memory, loop in wrong order
-Time/Execution
-Logical=a+b, when wanted to do a x b
-Rounding= calculating, not doing the correct rounding
-Truncation= number has more digits than code allows
Strategies to Avoid Errors
-write each section of the code and check individually before putting it all together
-modular code (functions)
-comments (#) someone else knows what your code does
-reviewing it
-meaningful variable and function names
-it debugs code (highlights complete brackets and different colours-e.g. in python)
-backing up work
Programming constructs
-One Dimensional Arrays= lists (two-dimensional arrays= list within a list)
-Pseudocode= structured english (<--) one method of writing down an algorithm
-Algorithms= list of instructions to solve problems (sequence, selection, interaction)
-Logical Expressions= AND, OR, NOT
-Appropriate Data Types= e.g. 7=integer character=m(male) or f(female)
-Variables and Constants (above)
Programming
-Programming languages such as:
Small Domain-Specific Languages
Visual Languages= scratch, app inventor
Text-based Languages= python, html, green foot
HTML to edit/create web pages
-Design and write solutions to given problems such as:write an app, a game or a tool to perform a task
-Debug Programms
-Explain how a program achieves its intended result (explain what code does-annotate)
High Level Languages = python, java
Machine Code = 1s and 0s
Variables:
-static = doesn't change
-dynamic = moving
-global = entire programme
-local = only in function
Constants = gravity, speed of light
Data Types:
-real number = any number (5, 6.2, -71)
-integer=3
-character= m(male) or f(female)
-string= hello
-boolean
-float=6.2
Translators
-Compilers= goes through code and when finds error, stops
-Interpreters= goes through 1 line of code at a time
-Assemblers=not high level-simpler, goes to machine code
Types of Errors
-Syntax= written code, spelling, punctuation, lower/upper case
-Run= divide0, run out of memory, loop in wrong order
-Time/Execution
-Logical=a+b, when wanted to do a x b
-Rounding= calculating, not doing the correct rounding
-Truncation= number has more digits than code allows
Strategies to Avoid Errors
-write each section of the code and check individually before putting it all together
-modular code (functions)
-comments (#) someone else knows what your code does
-reviewing it
-meaningful variable and function names
-it debugs code (highlights complete brackets and different colours-e.g. in python)
-backing up work
Programming constructs
-One Dimensional Arrays= lists (two-dimensional arrays= list within a list)
-Pseudocode= structured english (<--) one method of writing down an algorithm
-Algorithms= list of instructions to solve problems (sequence, selection, interaction)
-Logical Expressions= AND, OR, NOT
-Appropriate Data Types= e.g. 7=integer character=m(male) or f(female)
-Variables and Constants (above)
Programming
-Programming languages such as:
Small Domain-Specific Languages
Visual Languages= scratch, app inventor
Text-based Languages= python, html, green foot
HTML to edit/create web pages
-Design and write solutions to given problems such as:write an app, a game or a tool to perform a task
-Debug Programms
-Explain how a program achieves its intended result (explain what code does-annotate)