Introduction to Python Programming Flashcards

1
Q

program

A

A sequence of computer language statements that have been crafted to do something

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Input

A

Ways a program gets its data; user input through the keyboard, mouse, or other device.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Processing

A

Takes the data inputs and prompts and calculates the results (output).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Output

A

The results at the end of a program based on user input and system processing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

The ________ is the “grammar” rules of the programming language. Each programming language (like Python) has its own

A

Syntax

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

A ________ scans an entire program and attempts to convert the whole program at once to machine code.

A

Compiler

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Also known as machine language. The computer uses binary (0s and 1s) to perform tasks. At a high level, the programming language code that you write gets translated or compiled to the machine code that the computer understands.

A

Machine Code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

An intermediary step for code conversion between the programming language that you write and the machine code that a computer uses.

A

Bytecode

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

An __________ takes the bytecode one line at a time and converts it to machine code.

A

Interpreter

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Virtual Machine

A

A software program that behaves like a completely separate computer within an application.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

what are the steps for the development life cycle?

A
  1. Understand what the problem being asked is.
  2. Plan out the logic for the problem by breaking it down into a sequence of steps or algorithm.
  3. Write the code to perform the algorithm.
  4. Compile/translate the code to a format the computer can read.
  5. Test the program to ensure there are no syntax or logical errors.
  6. Deploy the program to be used.
  7. Support the maintenance of the program.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Which set of operations represents the correct order of a typical computer program?
a.) Output-Process-Input
b.) Input-Process-Output
c.) Input-Output-Process
d.) Process-Input-Output

A

b.) Input-Process-Output

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q
  1. What are the grammar rules that define a programming language referred to as?
    a.) Machine code
    b.) Pseudocode
    c.) Syntax
    d.) Byte code
A

c.) Syntax

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q
  1. Which term refers to the sequence of steps to solve a problem?
    a.) Interpreter
    b.) Machine code
    c.) Compiler
    d.) Algorithm
A

d.) Algorithm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Variable

A

A named memory location that has the ability to hold various distinct values at different points in time in the program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Concatenate

A

combine words or numbers

17
Q

Pseudocode

A

English-like statements that describe the steps in a program or algorithm.

18
Q

String

A

A data type that can store a literal string as a value.

19
Q

Literal String

A

A series of characters that are combined together and enclosed in quotes; for example, “Enter in the second number” is a literal string.

20
Q
  1. Which term refers to the English-like statements used to describe the steps in a program or algorithm?
    a.) Pseudocode
    b.) Source code
    c.) Program
    d.) Variable
A

a.) Pseudocode

21
Q
  1. The first step in designing any program is to __________.
    a.) determine the program inputs
    b.) determine the purpose of the program
    c.) break down the problem into its smallest parts
    d.) determine the program outputs
A

b.) determine the purpose of the program

22
Q
  1. __________ define(s) how steps should be arranged so that a program can complete a task correctly.
    a.) Logic
    b.) Pseudocode
    c.) Variables
    d.) Algorithm
A

a.) Logic

23
Q

Algorithm

A

A logical step-by-step plan that we need to build for solving a problem.

24
Q

Comments

A

The “#” (hashtag) is used in Python code to identify a comment. Commented lines of code are ignored by the compiler during run time. A programmer adds comments throughout the code to explain how the program or function works.

25
Q

Module

A

A self-contained piece of code that can be used in different programs.

26
Q
  1. Why is it important to look for patterns when solving a problem and designing an algorithm?
    a.) Patterns reduce the number of steps it takes to get to a solution.
    b.) Patterns make the task more complex.
    c.) It is impossible to solve a problem without patterns.
    d.) Patterns increase the number of steps it takes to get to a solution.
A

a.) Patterns reduce the number of steps it takes to get to a solution.

27
Q
  1. Algorithms consist of a(n) ____________ number of instructions.
    a.) abstract
    b.) finite
    c.) unlimited
    d.) approximate
A

b.) finite

28
Q
  1. What should be considered first when designing an algorithm?
    a.) What are the inputs?
    b.) What are the decision types?
    c.) What are the order of the steps?
    d.) What are the outputs?
A

a.) What are the inputs?

29
Q

Integrated Development Environment (IDE)

A

A text editor that has additional functionality to allow developers to perform some additional tasks to simplify the workflow of the development process.

30
Q

Libraries/Library

A

Prewritten code collections that you can use when developing a program.

31
Q
  1. The files that make up your Replit project are shown in the __________.
    a.) left pane
    b.) right pane
    c.) menu bar
    d.) middle pane
A

a.) left pane

32
Q
  1. After clicking the “new repl” button, you would name your project in the _________ field.
    a.) template
    b.) favorites
    c.) privacy
    d.) title
A

d.) title

33
Q
  1. In order to execute your code in Replit you select the ________ button.
    a.) source control
    b.) settings
    c.) run
    d.) debug
A

c.) run

34
Q

print()

A

The print() function allows Python to output data to the console (screen).

35
Q

Syntax Error

A

A syntax error means that you have violated the “grammar” rules of Python.