CSC 10A Accelerated Intro to Programming Logic Midterm 2 Study Guide

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

What is a Boolean expression?

An expression that can be evaluated as either true or false

What is defensive programming?

Anticipating obvious and unobvious errors/ bad input

What does the phrase "Garbage-in, Garbage-out" mean?

Bad input makes bad output

How do you call functions?

Function calls are usually inserted into statements that perform some operation with the value that is returned from the function

How do functions differ from modules?

Functions return a piece of data, while modules do not; Functions are also called differently than modules

What is a flag?

Indicates whether a specific condition exists or not; when false the condition does not exist, if true, it does

What will SetX=random (1,100) do?

It will return a random number between 1 and 100

What is a relational operator?

Less than, greater than, not equal to, equal to, greater than or equal to less than or equal to

What is a Do Until loop?

Loops until a condition is true

What is inside and outside range checking?

See if a variable is inside or outside a set of numbers

What is do while loop ?

This code is repeated until the condition becomes false.

What are logical operators?

AND= both must be true, OR= one or either must be true, NOT=Flips the value= NOT true= false, and NOT false= true

What is a dual alternative structure?

A structure that will execute one group of statements if its Boolean condition is false, and another set if it is true

What are the two parts of a While Loop?

1. Test if a condition is true or false 2. Statement(s) Are repeated until the condition is false (Pretest loop)

What is a Boolean variable?

A True or False data type. In a code, it may indicate whether a student got an exam right or not. Or if an iteration will run again.

What is an IPO chart?

A chart that labels the input, processing, and output parts of a program

What is a nested loop?

A loop inside another loop

What is a count-controlled loop?

A loop that repeats a specific number of times

What is the input validation process/loop?

A loop that repeats until it receives good Input data; looping as long as the input data is bad, it is a while loop

What is a condition-controlled loop?

A loop that uses a true/false condition to control the number of times that it repeats.

What is a function?

A module that returns a value back to the part of the program that called it

What is a library function?

A prewritten function that performs commonly needed tasks.

What is a Sentinel?

A special value that marks the end of a list of items; when this value is read, the program knows that it has reached the end of the list

What is a repetition structure?

A statement that causes statements to execute repeatedly

What is a Decision Structure?

A structure that allows a program to perform actions only under certain circumstances

What is a single alternative decision structure?

A structure that only provides one alternative path of execution


Ensembles d'études connexes

Biology: Objectives 5.1-5.3 and Option G1-G5

View Set

ATI Real Life RN Nursing Care of Children 4.0: Well Child

View Set

A Sociology of the Family Inquisitive

View Set

PEDs Exam 2 (resp, immune, cardiac, neuro)

View Set

Module 04 Cloud Computing and Assessment Tools

View Set

Writing a Compare-and-Contrast Essay about Presentation of Ideas

View Set