1: why should you learn to write programs? Flashcards

0
Q

Define CPU and its function

A

Central Processing Unit; the part of the computer that is built to be obsessed with asking you “what’s next”?

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

What does PDA stand for?

A

Personal Digital Assistant

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

Define main memory and its function

A

A location in the computer used to store information that the CPU needs in a hurry. It is nearly as fast as the CPU but the memory is stored only as long as the computer has an active power source

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

Define secondary memory and its function

A

This is another location to store memory for the CPU to use. Unlike main memory, this source is a lot slower but stores information even without a power source.

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

Define input and output devices along with their functions.

A

Parts which we use to interact with the computer and include such items as a screen, keyboard, mouse, microphone, speaker, or touchpad.

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

What is a program in relation to your computer?

A

A program is a set of instructions the programmer gives the computer in order to complete a specific tasks or series of tasks.

A sequence of python statements that have been programmed to do something.

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

What are reserved words?

A

These words each hold a very special and singular meaning in Python. One might consider them to be the “vocabulary” of the Python language.

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

What are variables?

A

Words that a programmer creates for the computer to understand. Additionally, the programmer gives a specific name and meaning to those words, but can never use any of Python’s reserved words for a name.

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

Name at least 10 reserved words.

A

And. Del. for. Is. Raise. Elif . From. Lambda. Return. Break. Else. Global. Not. Try. Class. Except. If. Or. While. Continue. Exec. Import. Pass. Yield. Def. Nally. In. Print.

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

Telling the computer to print is similar to….

A

Programming the computer to speak is called what in terms of a reserved word?

An instruction that prompts Python to display a value on the screen.

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

Define&raquo_space;>

A

What do you want to do next human?

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

Name 2 ways to exit Python interactive.

A

quit ()

^Z

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

Python takes binary machine language (0101001) and transforms it into what is considered a high-level language.

Name at least 4 other high-level languages.

A
C++
Java
PHP
Ruby
Basic
Pearl
JavaScript

Just to name a few…

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

Why is Python considered a high-level language?

A

Python takes machine-language and creates a secondary language in which humans can read, write and use for computers to read and process.

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

Why are high-level languages like Python so important to programmers?

A

Machine-language is specific for any given machine and therefor is not “portable” across different types of hardware. However, _______ languages like python or JavaScript act as translators to convert the programs to machine language so the CPU can execute the command.

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

What is an interpreter? Python is an example of an interpreter.

A

________ reads the source code of a program as written by the programmer, parses the source code and interprets the instructions.

16
Q

Define the term parse.

A

To analyze (a sentence of code) into its parts and describe their syntactic roles.

17
Q

What is the function of a compiler?

A

_______ takes the entire program in a file, and then runs a process to translate the high level source code into machine language. The ______ then places resulting machine language into a file for later execution.

18
Q

What does .exe signify when it’s attached to the name of a file?

A

Executable

19
Q

What does .dll signify when it’s attached to the end of a file?

A

Dynamically load-able library

20
Q

What is a script?

A

A program draft that is written using a text editor to write instructions into a file. These types of files end with .py

21
Q

Define sequential execution.

A

Perform statements one after another In the order they are encountered in the script.

22
Q

Define conditional execution.

A

Check for certain conditions and execute or skip a sequence of statements.

23
Q

Define repeated execution.

A

Perform some set of statements repeatedly, usually with some variation.

24
Q

Define reuse.

A

Write a set of instructions once and give them a name and then reuse those instructions as needed throughout your program.

25
Q

What are syntax errors?

A

A violation of the “grammar” rules of Python.

26
Q

What are logic errors?

A

A mistake in the order of statements or how they relate to one another.

27
Q

What are semantic errors?

A

A situation where your syntax and sequence is correct, BUT the program does not perform the task you intended it to do.

28
Q

Define portability.

A

A property of a program that can run on more than one kind of computer.

29
Q

What is a prompt?

A

When a program displays a message and pauses for the user to type some input to the program.