Computing Logic
What is the value of the following expression: (36%4)+(12/(3*2))
2
What is the value of the following expression: 22 % 5
2
What is the value of PayDay after the following statements have been executed: Set Hours = 5 Set PayDay = 30 Set PayDay = Hours *6
30
What is the value of the following expression: 40/4+6*4-2
32
Which of the following statements is not true? -The variable name I_Love_to_eat_pizza is a valid variable name. -When a variable is declared, its type should be specified. -A string variable can hold a numeric value but it cannot be used in a mathematical operation. -A Boolean variable can hold any integer value.
A Boolean variable can hold any integer value
A_____ variable can only have one of two possible values---- true or false.
Boolean variable
What are the variable in the following program segment? Write "How many candy bars do you want to buy?" Input CandyBars Set Price =2 Set Cost = CandyBars*Price Write "You need to pay" + Cost
CandyBars, Price, and Cost are the variables
Which of the following would you use to store a telephone number?
Declare PhoneNumber as String
The statement Declare FreezingPoint As Float will declare a variable named____ as a(n)____ type.
FreezingPoint Float
Any whole number-positive, negative, or zero- is a(n)
Integer
The type of number that cannot be expressed as a fraction because the fractional part would go on for infinity without ever repeating a sequence is
Irrational
Complete the following statement to declare an integer variable named Money: Declare___
Money as Integer
Which of the following is not an acceptable variable name? -Your_Friend -all of these are acceptable variable names -We_Are_All_Friends -My Friend
My Friend
Which of the following statements are true?
The expression 43%1=0 is correct.
What is the output of the following statements, given that the variable Num1=3 and the variable Num2=5? Write "The sum of" + Num1 + "and" + Num2 + "is 8."
The sum of3and5is 8.
Which is not a way to input data into a program
all of these are ways to input data into a program -keyboard, mouse, data file
Which is the first step in the program development cycle
analyze the problem
In the statement Set Temperature = 32, the value of 32 has been ___ to the variable Temperature.
assigned
When a variable is first assigned to a value, it is said to be
initialize
The operation in a computer program that transmits data from an outside source to a program is
input
The ____ operator returns the remainder after dividing one number by another.
modulus
Data sent by a program to the screen, a printer, or a file is
output
Data that consists of words and symbols found in text-based documents in known as ____data.
string
The rules of usage of a programming language is its
syntax
In the statement Set Number = 93, Number is a(n)___
variable