Basics Flashcards

1
Q
Ask user for a number, ask user for another number, multiply the two numbers, print result. What do you call this set of instructions?
A. An algorithm
B. A compiler
C. A class
D. PHP
A

A. An algorithm

An algorithm is a set of steps for carrying out a specific task. Algorithms are used extensively in computer programming to arrive at a solution for a problem. A real world example of an algorithm would be a recipe. The instructions of a typical recipe (add ingredients, mix, stir, etc.) are an algorithm.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q
If you needed to execute some code repeatedly based on a certain condition, which of the following would you use?
A. Variable
B. Loop
C. Compiler
D. Conditional
A

B. Loop

Loops are used to perform tasks repeatedly a certain amount of times. For example, if you needed to print the numbers 1 to 10. You can use a loop to do this instead of manually printing all the numbers.

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

You need special software to write programs.

True or False

A

False
It does help, but such software is not required, and for beginners it is better to work without it for the purpose of gaining experience. To write programs you just need a text editor.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
Before source code can be compiled, it has to be \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_.
A. parsed
B. viewed in a command prompt
C. capitalized
D. saved in a separate file
A

A. parsed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q
Which generation of languages allows for the use of words and commands?
A. 2nd generation
B. 1st generation
C. 5th generation
D. 3rd generation
A

D. 3rd generation

Before the 3rd generation of languages (3GL), it was just symbolic names (2nd generation), and before that just numbers (1st generation).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
What is the software called that translates code into something meaningful the computer can understand?
A. Converter
B. Compiler
C. Translator
D. Transliterator
A

B. Compiler

Specifically, a compiler is used to turn source code into object code which is then passed through a program called a linker which turns it into an executable program.

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

What is computer programming?
A. Convincing the computer to never freeze
B. Setting the alarm on a computer
C. Speeding up your computer
D. Telling the computer what to do through a special set of instructions

A

D. Telling the computer what to do through a special set of instructions

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

True or False

Beginner programmers should start with a development environment

A

False

If beginners use development environments, they may never really learn whatever language they are trying to learn since a development environment makes writing code easier. Beginners should start from the bottom and work their way up, writing source code without any additional help from software (development environments). Once a beginner feels comfortable enough, they can move on to using a development environment.

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

What is object-oriented programming?
A. A type of programming involving a structured method of creating programs
B. A type of programming using only numbers
C. A type of programming involving data types representing data structures
D. A type of programming not in use anymore

A

C. A type of programming involving

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

What is the difference between a variable and a constant?
A. Variables can be declared only in software languages
B. Constants can be declared only in Java
C. No difference
D. The value of a constant doesn’t change, the value of a variable can change all throughout a program

A

D. The value of a constant doesn’t change, the value of a variable can change all throughout a program.

A variable and a constant serve the same purpose - storing information in a computer’s memory, but the value of a variable can and does change all throughout a program, while the value of a constant does not change

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
Which of the following is NOT a software language?
A. HTML
B. Visual Basic
C. C++
D. C
A

A. HTML

HTML is a web language. C, C++, and Visual Basic are all software development languages.

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

Who invented the programming language Java?

A

Sun Microsystems

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

Name three programming languages.

A

Java
C
C++

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

Define Algorithm.

A

A set of steps for carrying out a specific task.

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

What is the process of creating an algorithm?

A

The process of creating an algorithm involves documenting all the necessary steps needed to arrive at the solution and how to perform each step.

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

Define Source Code.

A

The actual text used to write the instructions for a computer program. This text is then translated into something meaningful the computer can understand.

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

Define Compiler

A

A software tool that translates source code into data that the computer can understand. Specifically, a compiler is used to turn source code into object code. The object code is then passed through a program called a linker which turns it into an executable program.

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

Define Data Type

A

The classification of pieces of information in a program.

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

Define floating-point numbers

A

numbers with a decimal part

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

Define integers

A

whole numbers

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

Define variable

A

a container which represents a value in a program.

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

What three types of data can be used as variables?

A

numeric values,
single characters,
text strings

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

Define Constant

A

a container which represents a value in a program that does not change

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

Define Array

A

A special type of variable used in many programming and web languages including PHP, Javascript, and Java that contains a list of related values. For example, a colors array would contain a list of colors.

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

Define Loop

A

A segment of code that executes repeatedly based on a certain condition.

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

True or False

Loops are used to perform tasks repeatedly a certain amount of times.

A

True

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

Define Function

A

A set of code used to carry out specific tasks.

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

Define Class

A

A template for a real world object to be used in a program.

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

HTML

A

Hyper Text Markup Language

30
Q

XML

A

Extensible Markup Language

31
Q

javascript

A

A language developed by Netscape used to provide dynamic and interactive content on webpages.

32
Q

VBScript

A

Visual Basic Scripting Edition

33
Q

PHP

A

Hypertext Preprocessor

34
Q

Java

A

A powerful and flexible language created by Sun Microsystems that can be used to create applets that run inside webpages as well as software applications.

35
Q

Applets

A

A program that is executed from within another program.

36
Q

What is the considered the core language of the world wide web?

A

HTML

37
Q

True or False

HTML is not static, but rather flexible

A

False.

HTML is static - content created with HTML does not change.

38
Q

How does XML differ from HTML?

A

Like HTML, XML is used to define the structure and layout of web pages, but unlike HTML it allows for custom tags that are defined by programmers.

39
Q

Does JavaScript communicate with HTML?

A

Yes, it is possible to communicate with HTML using JavaScript.

40
Q

What web browser only uses VBScript?

A

VBScript was developed by Microsoft and will only work on Microsoft’s Internet Explorer web browsers and web browsers based on the Internet Explorer engine.

41
Q

Name four software languages.

A

C,
C++,
Visual Basic,
Java

42
Q

What software language was developed by Microsoft and is used for creating Windows applications?

A

Visual Basic

43
Q

What software language is the descendent of a previous language and is object-oriented?

A

C++

44
Q

What software language was originally developed in the 1970s at Bell Labs?

A

C

45
Q

What software language is the UNIX operating system written in?

A

C

46
Q

What software language is very popular for graphical applications?

A

C++

47
Q

Currently, how many generations exist of computer programming languages?

A

5

48
Q

Name the five current generations of computer programming languages.

A
first generation languages (1GL),
second generation languages (2GL),
third generation languages (3GL),
fourth generation languages (4GL),
fifth generation languages (5GL)
49
Q

Describe first generation computer programming language.

A

very early, primitive,
consists entirely of 1’s and 0’s,
machine language

50
Q

Describe second generation computer programming language.

A

allows for use of symbolic names instead of just numbers,
known as assembly languages,
code written in an assembly language is converted into machine language (1GL)

51
Q

Describe third generation computer programming language.

A

introduction of words and commands,
have syntax that is easier to understand,
known as ‘higher level languages’
includes C, C++, Java, and Javascript

52
Q

Describe fourth generation computer programming language.

A

syntax used is close to human language,
typically used to access databases,
includes SQL and ColdFusion

53
Q

Describe fifth generation computer programming language.

A

currently used for neural networks

54
Q

What is a neural network?

A

A form of artificial intelligence that attempts to imitate how the human mind works.

55
Q

Name three procedure-oriented languages?

A

COBOL,
FORTRAN,
C

56
Q

What is procedure-oriented programming?

A

A type of programming where a structured method of creating programs is used.

57
Q

What is object oriented programming?

A

A type of programming where data types representing data structures are defined by the programmer as well as their properties and the things that can be done with them.

58
Q

In object-oriented programming, what do you call data types defined by the programmer?

A

classes (templates for a real world object to be used in a program)

59
Q

What does it mean to ‘parse’ code?

A

To break up the code into smaller parts. Source code must be parsed before it can be converted into meaningful data for the computer.

60
Q

What step follows parsing source code?

A

Compilation

61
Q

What is meant by compiling source code?

A

Turning the code into an actual program.

62
Q

Name the two steps involved in compiling source code.

A
  1. source code is turned into object code by a compiler. 2. object code must be passed through a linker.
63
Q

What does it mean to Interpret Source Code?

A

It means to turn the code into an intermediate form which is executed by a program called an interpreter instead of turning source code directly into machine code like a compiler does.

64
Q

What type of code does a compiler turn source code into?

A

machine code

65
Q

What happens to code written in languages for software development? (e.g. C, C++, C#, and Delphi)

A

This type of code is compiled because these languages are designed to create executable programs.

66
Q

What happens to code written in languages used for web development? (e.g. JavaScript, VBScript, PERL, and PHP)

A

This type of code is interpreted because these languages are designed to create web applications and display data on web pages, not to create an executable program.

67
Q

Name four examples of languages used for web development.

A
  1. JavaScript
  2. VBScript
  3. PERL
  4. PHP
68
Q

Name four examples of languages for software development.

A
  1. C
  2. C++
  3. C#
  4. Delphi
69
Q

What two tools are needed to write a program?

A

A text editor and a software tool to turn your source code into meaningful data that the computer can understand (compiler and/or interpreter).

70
Q

How would one access a text editor in windows?

A

Use notepad.

Go to Start -> Programs -> Accessories -> Notepad or Start -> Run -> Type ‘notepad’ and press Enter.