X - Script. & Prog. Foundations Flashcards

1
Q

What kind of operator is the == in the expression i == 20?

  • Assignment
  • Arithmetic
  • Equality
  • Logical
A
  • Equality
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Which expression represents all the values of x, when x is the age ranging from 18 to 24 years old?

  • (x >= 18) or (x <= 24)
  • (x >= 18) and (x <= 24)
  • (x < 18) or (x > 24)
  • (x < 18) and (x > 24)
A
  • (x >= 18) and (x <= 24)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which language is not built on object-oriented design principles?

  • C
  • C++
  • Java
  • Python
A
  • C
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a characteristic of an interpreted language?

  • Runs faster than compiled languages
  • Outputs an interpreter to run the program
  • Runs easily on different kinds of machines
  • Needs to be converted to machine code first
A
  • Runs easily on different kinds of machines
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

A function calculates the weight difference (Diff) given two sample weights (S1 and S2).

What should be the output from the function?

  • S1 only
  • S2 only
  • S1 and S2
  • Diff
A
  • Diff
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Todo: define each type of control structure

A program should continue accepting input numbers, adding each to a sum, until a 0 is input.

Which control structure should be used?

  • If statement
  • For loop
  • Multiple if statements
  • While loop
A
  • While loop
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Joe is building an online game. He wants to provide a riddle and have the player guess the answer. The game needs to prompt the user to enter the answer, check to see if it the input provided does not match the correct answer, and continue prompting the user until the answer entered matches the correct answer.

Which control structure supports Joe’s needs?

  • For loop
  • While loop
  • Do-while loop
  • If-else branch
A
  • If-else branch
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is put to output by the following pseudocode?

x = 3
do
   Put x to output
   Put " " to output
   x = x - 1
while x > 0
  • 3 2 1 0
  • 3 2 1 0 -1
  • 2 1 0
  • 3 2 1
A
  • 3 2 1
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Which phase of a waterfall approach would create a sequence diagram that specifies the required order of events between completed program components?

  • Analysis
  • Design
  • Implementation
  • Testing
A
  • Testing
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Which phase of an agile approach would create a list of components needed to build an online auction site?

  • Analysis
  • Design
  • Implementation
  • Testing
A
  • Design
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

A company has a new project it wishes to implement to track and analyze employee and customer interactions. The company leadership determines that the system should support direct data entry as well as automated data capture of phone calls and emails.

Which phase of the waterfall process is occurring?

  • Analysis
  • Design
  • Implementation
  • Testing
A
  • Analysis
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

A programmer shows a program’s first version to a customer. The customer provides feedback, which causes the programmer to change the goals of the program.

In which phase of an agile approach are goals changed based on customer feedback?

  • Analysis
  • Design
  • Implementation
  • Testing
A
  • Analysis
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Order the tasks needed to create a pyramid (large on bottom, small on top) on a table from first (1) to last (4).

  • Place largest shape.
  • Clear table.
  • Place middle-sized shape.
  • Place smallest shape.
A
  • Clear table.
  • Place largest shape.
  • Place middle-sized shape.
  • Place smallest shape.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Which elements are characteristic of a class diagram?

  • System’s classes, attributes, and methods and their features, constraints, and relationships
  • Flow of logic and process interaction within a system
  • Physical resources or logical architecture of a system
  • Internal structure of a class and collaboration between classes or instances
A
  • System’s classes, attributes, and methods and their features, constraints, and relationships
How well did you know this?
1
Not at all
2
3
4
5
Perfectly