Introduction to programming Flashcards

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

data types

A

integer
float
string
boolean

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

how to change data types

A

use built in functions such as
int()
str()

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

arithmetic operators

A

+ - / *

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

// or INT in psuedocode:

A

gives the result of a division rounded down to the nearest whole number

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

% or MOD in psuedocode:

A

gives the remainder as an integer

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

** or ^ in psuedocode

A

raises one number to the power of another

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

what are the relational operators and what do they do

A

= - equals
!= - not equal to
> - greater than
< - less than
<= - less than or equal to
>= - greater than or equal to

they compare two expressions and produce a boolean expression .

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

what are the boolean operators and what do they do

A

and
or
not

they join boolean expressions to create larger boolean expressions

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

what are the 3 basic program structures

A

sequence
selection
iteration

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

what are the names for a selection structure

A

branching
conditional

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

key words used in selection structures

A

if
else
elif
switch
case

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

what are the two types of loop

A

counter - controlled loop (for loop)
condition controlled loop (while loop)

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

Abstraction

A
  • remove unnecessary details
  • replace features with simplified symbols
  • makes prog easier to write and reduces need for resources like processing and memory
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Syntax error

A

break rules of the programming language

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

Run - time error

A

program tried to do an impossible thing such as divide by zero

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

Logic error

A

program works but does the wrong thing - can only be found via testing

17
Q

features of an IDE for writing code

A
  • text editing and formatting
  • translating and executing code
  • autocomplete
18
Q

features of an IDE for finding errors

A

-Error messages
- step- through
- break point