Unit 7 - Programming Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What are the 5 different data types?

A

Integer, float, character, string, boolean

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

What are the 6 arithmetic operators?

A

+, -, ^, *, /, DIV, and MOD

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

How to cast for different data types?

A

str()
float()
int()
bool()

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

What are the three operators used in Boolean expressions?

A

AND, OR, NOT

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

What is sequence?

A

Instructions that are carried one after the other in order.

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

What is selection?

A

Instructions that can evaluate a Boolean expression and branch off to one or more alternative paths. An ‘if’ statement is a selection statement.

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

What is iteration?

A

Repetition of a section of code.
Two types:
for…….next
while…….end while

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

What is a FOR loop?

A

It is a fixed loop - code is repeated a known number of times.

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

What are WHILE loops?

A

Use this when you want to execute a loop WHILE a condition is true.

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

What is an array?

A

An array is a data structure that allows you to hold several variables, all of the same types, with one name. In Python, there are no arrays, only lists.

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

What are two different types of subroutines?

A

Functions and Procedures.

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

What is a function?

A

A block of code within a program that is given a uniquely identifiable name. Can take upwards of zero parameters when it is called and should return a value. Should be designed and written to perform a task or action that is indicated by its name.

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

What is a procedure?

A

A block of code within a program that is given a unique, identifiable name. Can take upwards of zero parameters when it is called. Should be designed and written to perform a task or action that is indicated by its name.

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

What are subroutines?

A

Used to break up a large program into smaller chunks.

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

What is a record?

A

It is a data structure consisting of several fields which can all be of different types.

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

What is a file?

A

It is a collection of records.

17
Q

What is SQL?

A

Structured Query language
SELECT
FROM
WHERE