Final exams Pt 1 Flashcards

1
Q

List the major components of a computer

A
  • Central Processing Unit (CPU)
  • Graphics Processing Unit/Video Card
  • Random Access Memory (RAM)
  • Read Only Memory (ROM)
  • Secondary Memory (HDD, SSD)
  • Motherboard
  • Peripherals
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

List 3 things a CPU does

A
  • Perform Logical Operations
  • Process Data
  • Store Data
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Give the functions of: RAM, Secondary Memory, GPU, Peripherals

A
  • RAM: Store data short term while the computer is working with it
  • Secondary Memory: Store data long term, while a program is closed or while the computer is turned off
  • GPU: Process graphics calculations and create images
  • Peripherals: Take input and give output to the user
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the 5 data types that variables can be? Give a literal example of each.

A
  • int – 5, 10, -5 (whole numbers)
  • float – 2.0, 3.6, 0.45 (integers)
  • char – ‘a’, ‘@’, ‘P’ (characters)
  • String – “Hello!”, “this is a sentence” (words)
  • boolean – true, false (true or false)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the requirements for a variable identifier?

A

Must start with a letter, can only contain letters, numbers, and the underscore ( )

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

Variable declaration statement:
A variable to hold the number of birds spotted in a day

A

int birds;

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

Variable declaration statement:
A variable for someone’s overall average mark at school

A

float mark;

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

Variable declaration statement:
A variable for the vertical position of a circle on the screen

A

1) int y;
2) float y;

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

Variable declaration statement:
A variable to hold someone’s name

A

String name;

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

Variable declaration statement:
A variable to indicate if an event needs to start

A

boolean go;

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

Variable declaration statement:
A variable to hold a key on the keyboard

A

char letter;

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

Variable initialization statement:
A variable to hold the sum of a bunch of numbers.

A

int sum = 0;

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

Variable initialization statement:
A variable which will be used to calculate the product of set of numbers

A

float product = 1; or int product = 1;

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

A variable that will hold the name of a character.

A

String name = “your name”;

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