Lecture 1 Flashcards
Define what ‘programming’ means
“the process or activity of writing computer programs”
What is a ‘computer program’?
“a series of coded software instructions to control the operation of a computer or other machine”
What is a programming language?
- purely instructive
- computers have no common sense, so you have to be very precise
- bridge between machine code and human language
What are the different types of languages (or translators)?
Describe the differences.
a) interpreted language
- runs line for line
- can be modified whilst program is running
- starts right away after having been given instructions
- runs directly
b) compiled language
- translated all instructions in one go (takes a bit longer to prepare)
- runs very quickly once compiled
- cannot be modified whilst running
There are different levels of languages in programming. Lists these levels.
- Hardware
- Machine language
- Assembly language
- High-level language
What function do you use to find the length of a list?
len()
What function do you use to find the type of a value?
type()
Describe what assembly language consists of
- lowest level of a language humans can practically use
- communicates directly with a computer’s hardware
What does a ‘machine language’ consist of?
- binary code
- easily understandable for machines
- considered a low-level language
What does a ‘high-level language’ consist of?
- easily understandable for humans
- requires a translator or compiler for translation
What is the difference between domain specific languages and general purpose languages?
Domain specific languages are specialized to a specific application domain. In example, HTML is only used for webdesign. General purpose languages can be used for a wide array of applications; not one specific task.
What elements are applicable to Python? Pick one option for each section: A. High-level/assembly/machine language B. Interpreted / compiled C. Domain specific / general purpose D. Object oriented, yes or no?
A. high level
B. interpreted
C. General purpose
D. Yes, it’s object oriented
What does IDE stand for?
Integrated Development Environment.
It’s a seperate program used to write code in. For example: PyCharm.
What is a syntax?
“rules that define the structure of a language”
Do all programming languages have a syntax?
Yes, however, they each use a different one. This means that in each programming language, different rules apply.