Module 1

Ace your homework & exams now with Quizwiz!

instruction list

A complete set of known commands is called an instruction list

What do you call a command-line interpreter which lets you interact with your OS and execute Python commands and scripts? A: An editor B: A compiler C: A console D: Jython

A console

Python is an example of

A high-level programming language

source code

A program written in a high-level programming language is called a source code (in contrast to the machine code executed by computers).

What do you call a file containing a program written in a high-level programming language?

A source file

What are the four fundamental elements that make a language?

An alphabet, a lexis, the syntax, and semantics

What is IDLE?

An integrated development environment for Python.

What do you call a computer program which directly executes instructions written in a programming language?

An interpreter

4: What is machine code? A: A low-level programming language consisting of hexadecimal digits that make up high-level language instructions B: A low-level programming language consisting of binary digits/bits that the computer reads and understands C: A medium-level programming language consisting of the assembly code designed for the computer processor D: A high-level programming language consisting of instruction lists that the humans can read and understand

B: A low-level programming language consisting of binary digits/bits that the computer reads and understands

What is the expected behavior of the following program? prin("Goodbye!") A: The program will output Goodbye ! to the screen B: The program will output "Goodbye!" C: The program will generate an error message on the screen D: The program will output ("Goodbye !")

C

two different ways of transforming a program from a high-level programming language into machine language:

COMPILATION & INTERPRETATION

3: What is the best definition of a script? A: It's an error message generated by the compiler B: It's an error message generated by the interpreter C: It's a text file that contains sequences of zeroes and ones D: It's a text file that contains instructions that make up a Python program

D: It's a text file that contains instructions that make up a Python program

How did Python, the programming language, get its name?

Guido Von Rossum named it to honor Monty Python's Flying Circus, a BBC Comedy series popular in the 1970's.

What is CPython?

It's the default, reference implementation of Python, written in the C language

What Python version is covered in this course?

Python 3

What is CPython?

The default implementation of the Python programming language

What is the expected behavior of the following program? print("Hello!")

The program will output Hello! to the screen.

high-level programming languages

They are at least somewhat similar to natural ones in that they use symbols, words and conventions readable to humans. These languages enable humans to express commands to computers that are much more complex than those offered by ILs.

What is source code

a program written in a high-level programming language

A complete set of commands is known as

an instruction list

Which one of the following is an example of a Python file extension? pi, p, py

py

source file

the file containing the source code is called the source file

COMPILATION

the source program is translated once (however, this act must be repeated each time you modify the source code) by getting a file (e.g., an .exe file if the code is intended to be run under MS Windows) containing the machine code; now you can distribute the file worldwide; the program that performs this translation is called a compiler or translator;

INTERPRETATION

you (or any user of the code) can translate the source program each time it has to be run; the program performing this kind of transformation is called an interpreter, as it interprets the code every time it is intended to be executed; it also means that you cannot just distribute the source code as-is, because the end-user also needs the interpreter to execute it.

What is true about compilation? (Select two answers) A: It tends to be faster than interpretation B: The code is converted directly into machine code executable by the processor C: Both you and the end-user must have the compiler to run your code D: It tends to be slower than interpretation

A and B

1: Select the true statements? (Select two answers) A: Python is a good choice for creating and executing tests for applications B: Python 3 is backward compatible with Python 2 Python C: Python is a good choice for low-level programming, eg. when you want to implement an effective driver D: Python is free, open-source, and multiplatform

A and D

What do you call a tool that lets you launch your code step-by-step and inspect it each moment of execution?

A debugger


Related study sets

Real Estate Principle Quizzes, Modern real estate practice 20th edition chapters 1 through 4, Real Estate Principle Quizzes, Modern real estate practice 20th edition chapters 1 through 4

View Set

Chapter 47: Assessment of Endocrine System

View Set

Archer Child Health - Cardio/Respiratory

View Set

MA driver's learning permit test

View Set

Data Collection, Behavior, & Decisions

View Set

Davis Pediatric Success Chapter 5 Cardiovascular Disorders

View Set

Catcher in the Rye Character List

View Set

Chapter 19 Cardiovascular System: Heart

View Set

NRSC4032 - Chapter 11: Memory Consolidation

View Set

PSY 3403.Experimental Psychology

View Set

Chapter 6 International Business Wild

View Set