Flashcards: Introduction to Computer Programming — 38 cards

All cards

1Question

How long is the lecture time in Unit 1?

Answer

Two hours of lecture time.

2Question

Does Unit 1 include any laboratory work?

Answer

No, it includes no laboratory work.

3Question

Do students write or compile code in Unit 1?

Answer

No, students write and compile no code in Unit 1.

4Question

What is a computer?

Answer

A machine that stores data and executes instructions exactly as given.

5Question

What defines a program?

Answer

A complete set of instructions telling a computer how to perform one job.

6Question

What is an instruction in a program?

Answer

One single command inside a program.

7Question

How does a computer obey instructions?

Answer

It obeys literally, in order, unless told to jump, and never guesses.

8Question

What does a computer never do when an instruction is unclear?

Answer

It never guesses when an instruction has no single definite meaning.

9Question

Who is responsible for every instruction a computer executes?

Answer

The programmer is accountable for every instruction carried out.

10Question

Does programmer responsibility include omitted instructions?

Answer

Yes, it includes instructions omitted or failing to handle a case.

11Question

What does a system program manage to keep the computer working?

Answer

Memory, files, devices, and processor sharing.

12Question

What is the purpose of an application program?

Answer

To perform a job wanted by the user.

13Question

Give examples of jobs an application program performs.

Answer

Writing, browsing, or computing a grade.

14Question

What is an operating system in relation to system programs?

Answer

The main system program.

15Question

What resources does an operating system share among programs?

Answer

Memory, processor time, and files.

16Question

What digits does the binary number system use?

Answer

Digits 0 and 1.

17Question

What is machine language composed of?

Answer

Instructions written in binary.

18Question

Which language form can the processor execute directly?

Answer

Machine language.

19Question

How do you convert a binary number to decimal?

Answer

Add place values of positions containing 1.

20Question

What are the place values in binary from right to left?

Answer

1, 2, 4, 8, 16, 32, and so on.

21Question

What does assembly language use to write machine instructions?

Answer

Short command words like LOAD, ADD, and STORE.

22Question

How many machine steps does one assembly language word represent?

Answer

One machine step.

23Question

Why is a high-level language written?

Answer

For programmer convenience.

24Question

How many machine steps does one high-level language line represent?

Answer

Many machine steps.

25Question

What form is machine-level code in for the processor?

Answer

Binary code.

26Question

What does assembly-level code use for each machine step?

Answer

Short words.

27Question

What type of statements does high-level code use?

Answer

Readable statements for several machine steps.

28Question

What does a translator program do?

Answer

It converts source code from one language to another.

29Question

When does a compiler translate source code?

Answer

Before the program runs, translating the whole source file.

30Question

What output does a compiler produce?

Answer

A machine-code file saved on disk.

31Question

How does an interpreter execute source code?

Answer

It translates and runs one instruction at a time during execution.

32Question

Does an interpreter save a translated file?

Answer

No, it does not save a translated file.

33Question

How does compilation differ from interpretation in start time?

Answer

Compilation is slower to start than interpretation.

34Question

Which is faster to run: compiled or interpreted code?

Answer

Compiled code runs faster than interpreted code.

35Question

When does interpretation find errors compared to compilation?

Answer

Interpretation finds errors when the line is reached during execution.

36Question

How do you make an everyday instruction executable?

Answer

Replace every vague judgment with an exact condition and specify the exact output.

37Question

What exact output should be displayed if the grade is 75 or more?

Answer

PASSED

38Question

What exact output should be displayed if the grade is less than 75?

Answer

FAILED

Test yourself with the quiz

Test your knowledge with 21 questions on Introduction to Computer Programming.

1. What does Unit 1 require students to do with code?

2. What is the scheduled format of Unit 1?

Take the quiz →

Read the revision sheet

Review the complete course in the revision sheet for Introduction to Computer Programming.

See revision sheet →

Similar courses

Create your own flashcards

Import your course and AI generates flashcards in 30 seconds.

Flashcard generator