X - Script. & Prog. Foundations Flashcards
What kind of operator is the == in the expression i == 20?
- Assignment
- Arithmetic
- Equality
- Logical
- Equality
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)
- (x >= 18) and (x <= 24)
Which language is not built on object-oriented design principles?
- C
- C++
- Java
- Python
- C
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
- Runs easily on different kinds of machines
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
- Diff
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
- While loop
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
- If-else branch
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
- 3 2 1
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
- Testing
Which phase of an agile approach would create a list of components needed to build an online auction site?
- Analysis
- Design
- Implementation
- Testing
- Design
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
- Analysis
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
- Analysis
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.
- Clear table.
- Place largest shape.
- Place middle-sized shape.
- Place smallest shape.
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
- System’s classes, attributes, and methods and their features, constraints, and relationships