Language of a Computer and Python Flashcards
Computer programs (software) are not designed specifically for each task.
False.
A software is created with a compiler.
False. Programming languages.
Every computer understands its own language directly.
True.
A binary digit (bit) can be 0 or 100.
False. 0 or 1.
It is the smallest unit of data that a computer can process and store.
Bit.
A byte is a sequence of…
8 bits.
How many bytes in 100,000 bits?
12,500 bytes.
Python instructions (source code) need to be translated into a _ _ using an _.
machine language, interpreter
They are programs that translates a program in a high level language into the equivalent machine language.
Compiler/interpreter.
What are the 2 programming methodologies?
- Object oriented programming
- Procedural programming
Structured design _ a problem into _ problems then _ the bigger problem by _ all _.
divides, smaller, solves, combining, solutions
In an object oriented design (OOD), a program is…
a connection of interacting objects.
An OOD also includes variables and functions.
An object consists of…
data and operations.
What are the 3 steps in OOD?
- Identify objects
- Form solutions
- Determine how objects interact
Python is a _ purpose, dynamic, and _ programming language.
general, interpreted
Python does not support OOD (to develop apps) and structured design.
False.
Python provides lots of high level data structures.
True.
He is the founder of Python.
Guido van Rossum.
He released it on February 20, 1991.
Previous versions of a programming language can still be used.
False.
It is the predeccesor of Python.
ABC.
What are features of Python?
There are 12.
- Easy to use
- Expressive
- Interpreted language
- Cross platform language (portable language)
- Free and open source
- OOD language
- Extensible
- Large standard library
- GUI programming support
- Integrated
- Embeddable
- Dynamic memory allocation
A cross-platform/portable language can be used in…
different OS.
Since Python is extensible, it can be…
compiled using other languages.
Converts program into bytecode.
Since Python has dynamic memory allocation, specifying the data type is still needed.
False.
What are some applications of Python?
- Web
- Desktop
- GUI
- Software development
- Scientific and numeric
- Business
- CAD
- Image processing
How does an interpreter work?
- Write the program using a text editor
- Turn into source file
- Go through interpreter to be compiled, transformed into byte code (.pyc), and go into virtual machine
- Translate into ML
- Execute code line by line
What differentiates an interpreter from a compiler?
An interpreter executes line by line, but a compiler has to read the entire source code first before executing.
What are the 3 problem solving processes?
- Analyse the problem
- Implement the algorithm
- Maintain the program
It is a program methodology represented by functions or modules.
Structured design.
It is the focus of structured design.
Top-down decomposition, and control/data flow.
What are the 4 central characteristics of OOD?
- Encapsulation
- Inheritance
- Polymorphism
- Abstraction
To run a Python program, Python instructions need to be translated into an…
intermediate language called bytecode.
To run a Python program, the _ is _ into a particular machine language.
bytecode, interpreted
In Python, the machine language is called…
bytecode.
What is a Python Virtual Machine?
A hypothetical computer developed to make Java programs machine independent.
In structured design, the broken down components are often represented as…
functions or modules.
What are the 3 common techniques in structured design?
- Data flow diagrams
- Warnier-Orr diagrams
- Structure charts
The OOD approach.
It views a system as a collection of objects, each with its own data (attributes) and behaviours (methods).
OOD focuses on these 4 central characteristics.
- Encapsulation
- Inheritance
- Abstraction
- Polymorphism
3 common techniques in OOD.
- Class diagrams
- Unified Modeling Language
- Design patterns
Differentiate structured design from OOD.
- Structured design emphasizes the functional decomposition of a system, focusing on how data flows through it.
- OOD focuses on modeling real-world entities and their interactions within a system, emphasizing data encapsulation and object-oriented principles.
Modern software projects never use structured design and OOD in tandem.
False.