FINAL exam material comp apps

Ace your homework & exams now with Quizwiz!

How many iterations will occur in the following loop? Assume the variable again has been declared.for (again = 0; again < 10; again++) {....} Type your NUMERICAL answer.

10

Which of the following binary values is twice the value of the binary number 1010?

10100

How many iterations will occur in the following loop? Assume the variable again has been declared.for (again = 10; again >= 0; again--) {....} Type your NUMERICAL answer.

11

Which of the following binary numbers (base 2) are multiples of 4? CHOOSE TWO ANSWERS.

11100 10100

What is the value of the variable shipping if cost = 49 and country = "Canada"? if (cost < 50 && country != "Canada") shipping = 6.00; if (cost < 100 && cost >= 49 && country != "Canada") shipping = 9.00; else. shipping = 12.00;

12.00

Consider the following JavaScript code segment. var num1 = 0; var num2 = 10; for(var i = 0; i < 5; i++){ for (j = 0; j < 3; j++){ num1++; } num2 = num2 - 2; } What is the final value of num1?

15

What is the largest decimal number (base 10) that can be represented using only 4 bits?

15

What is the largest value that could be assigned to the variable rand if the following statement were executed? rand = (Math.floor ( 8 * Math.random() ) + 1) + ( Math.floor ( 10 * Math.random() ) + 1) Enter your answer below.

18

Consider the following JavaScript code segment. var sum = 0; var arr = new Array(7,1,6,9,4); for(var i = 2; i < arr.length; i++){ sum += arr[i]; } document.write(sum); What is displayed when this code is executed?

19

What is the smallest value that could be assigned to the variable rand if the following statement were executed? rand = (Math.floor ( 10 * Math.random() ) + 1) + ( Math.floor ( 8 * Math.random() ) + 1) Enter your answer below.

2

Consider the following JavaScript code segment: var a = Number("23" + "311") / 1000;document.write (a.toFixed(2) ); What is output?

23.31

A coding scheme that uses 8-bits has ________ possible combinations.

256

Consider the following JS code segment: var count = 20; for (var i = 0; i < 5; i ++) { count = count - 1; } count = count + count; alert(count); What value is displayed in the Alert?

30

The Hawaiian alphabet has 18 symbols. How many bits are needed to represent just these symbols?

5

What is output? var x = 10; if (x > 5) { x = 1; } else { x = 0 ; } document.write(x);

1

The values returned by the Math.random()function are between

0 (inclusive) and 1 (exclusive)

In JavaScript, the statement 17 % 4 results in

1

In JavaScript code, the correct format to express a range of numbers between 50 to 500 is:

50 <x && x < 500

A primitive barcode system is used to identify products sold in a small trinkets store. The system used is a 3 x 3 grid where each cell in the grid is either BLACK or WHITE. If each product must be identified by a unique barcode, how many products can the store accommodate with this barcode system? Give the exact numerical answer.

512

How many bits does it take to represent the decimal number 35?

6

A coding scheme that uses 6-bits has ________ possible combinations.

64

A text-editing application uses binary sequences to represent each of 116 different characters. What is the minimum number of bits needed to assign a unique bit sequence to each of the possible characters?

7

What is the final value of follow after the code segment below is executed? var follow = 100; for (var i = 1; i <= 3; i++){ follow = follow - 20; } for (var i = 1; i <= 5; i++){ follow = follow + 10; }

90

What is the final value of z after following JavaScript code segment is executed? var x = 12, y = 9; var z = x / 2 + y / 3 + "88" ;

988

Refer to the included Bike Safety Patrol Budget Spreadsheet. Column F contains the cost to the customer after giving the discount in Column E. What formula should be in Cell F4 to accomplish this task? Type NO spaces.

=(D4-E4)

Refer to the included Bike Safety Patrol Budget Spreadsheet. Cell J8 contains the total charge for all items(T-shirts, jackets, helmets, belts). What formula should be in Cell J8 to accomplish this task? Type NO spaces. [____]

=(J4+J5+J6+J7)

Refer to the included Bike Safety Patrol Budget Spreadsheet. Cell B8 contains the number of different products ordered (number of items listed in column A) . What formula should be in Cell B8 to accomplish this task?

=countA(A4:A7)

Which of the following describes an advantage of using hexadecimal numbers instead of binary numbers to represent data?

A hexadecimal representation of a value generally requires fewer digits than a binary representation of the same value.

When searching on Google, the plus sign (+) is the same as using the ________ operator.

AND

You wish to determine the average number of orders placed in the West. What Excel formula would be best to use.

AVERAGEIF

Consider the JavaScript code segment below: var choco = new Array("Hershey", "M&M", "Godiva", "Cadbury"); var yumCandy = choco[choco.length - 1]; What us the value of yumCandy>:

Cadbury

The mouse was invented by

Douglas Engelbart and others at the Stanford Research Institute

Functions allow for code to be reused because parts of the solutions are hidden.

Fakse

A function definition is the same as a function call.

False

All colors with equal intensities of the RGB subpixels are always some shade of gray.

False

If you have a printer attached to your computer and then add a new pair of speakers, you will not need a new device driver since you already have a device driver for the printer..

False

When a computer connects to the Internet via an ISP for the first time, it is assigned an IP address that it keeps for as long as the user continues to use that ISP.

False

When creating a flowchart, the symbol for a decision is the parallelogram and the symbol for an assignment is a rectangle.

False

var green = -5; The expression ! (green) will change the sign of the value on the variable green .

False

Consider the following JavaScript code segment : for(var i = 1; i <= 3; i++){ for(var j = 1; j<= 4; j++){ document.write("*"); } document.write("<br>") } When this code is executed, the following is displayed: **** **** **** How would the code need to be changed to result with the display: * ** *** ****

I made a few minor changes in order to change the display of the Javascript. The variable i would need to be changed to for (var i = 1; i <= 4; ++i) to allow the loop to execute 4 times. The variable j needs to be declared in terms of i to change the amount per loop. for (var j = 1; j <=i; ++j) This change allows the loop to continuously build each round based off of variable i's value.

Select all that apply. Which of the following are considered operating systems?

Linux macOS

Consider the flowchart below. Which of the following inputs would result in SMALL TICKET being output? I. speed = 65, isBirthday = true II. speed = 80, isBirthday = false III. speed = 85, isBirthday = true

II and III only

Which of the following represents the correct order from largest to smallest?

Internet, WWW, LAN

Let's say you're trying to find your average grade. What's wrong with the formula shown in the image?

It should have an equals sign in the beginning

You wish to determine the total number of orders (Column C) placed by all salespeople (NAMES). What Excel formula would be best to use.

SUM

You wish to determine the total number of orders (Column C) placed in the West.What Excel formula would be best to use.

SUMIF

You wish to determine the total number of orders in the West sold by Jerry.What Excel formula would be best to use.

SUMIFS

var i = 28; if ( i / 2 % 2 > 0 ) { document.write("The number is an odd integer"); } else { document.write("The number is an even integer"); } What is displayed when the code segment above is executed?

The number is an even integer

Assume the following JavaScript variable assignments have been made: var a = 2, b = 4, c = 6; var result = b % 3 < a && c % 3 < = 3 What is the final value of the variable result?

True

Assume the following JavaScript variable assignments have been made: var a = 2, b = 4, c = 6; The Boolean expression b % 3 < a && c % 3 < = 3 evaluates to _____?

True

Assume the following JavaScript variable assignments have been made: var a = 2, b = 4; The Boolean expression ! (a > 2) evaluates to _____?

True

In the mid-1990s the Internet, already long available to researchers, became generally available to the public.

True

It requires three bytes to represent the color of a single pixel.

True

Local variables cannot be accessed outside the functions in which they are declared.

True

Running a program with the exact same data produces exactly the same results every time.

True

Software is a collective term for the instructions computers perform to implement applications.

True

The DNS translates an address that can be easily read by users into an IP number.

True

The name of a function identifies it and must be used when the function is called.

True

The sequence of commands is important in an algorithm.

True

Select all that apply. Which of the following are valid variable declarations?

Var x var myName = 23

Consider the following code segment. var a = 3; var b = 8; var c = 4; a = a + 1; b = b - 1; c = c + a; What are the final values of a, b, c

a = 4 b = 7 c = 8

If a cell points to cell $F$3, this is an example of a(n)

absolute cell reference

The central idea or concept, removed from a situation, is called

abstraction

(Choose all that apply) The ability to perform analog-to-digital conversion allows us to:

alter colors in the image brighten an image darken an image change the contrast of an image

To reduce the chance of messing up range specifications and minimize the likelihood that errors will creep in when columns and rows are added later

apply names in the spreadsheet

A measure of how much information is transmitted per unit time is ________.

bandwidth

A search for "baseball" AND ("stadiums" OR "parks") AND NOT "national parks" would look for

baseball stadiums or baseball parks but not national parks

Which of the following is the correct code for the step size of the loop shown to ensure that the loop will repeat exactly five times?for ( c = 3; c < 13; ________)

c = c + 2

Programs written in a high-level language are translated into assembly language and then assembled into binary. In other words, programs are ________.

compiled

Which of the following is an infinite loop?

for (k = 1; k <= 4; k = k - 1)

Write another JavaScript loop that executes as many times as the one below. for (var i = 0; i <= 5; i = i + 1) { document.write ("hello" + "<br>"); }

for (var i = 0; i < 6; i = i + 1) { document.write ("hello" + "<br>"); }

The purpose of a cookie is to

give the illusion of a continuous connection

One example of descriptive text is anchor text which is

highlighted link text, specified inside tags that describes the page it links to

CSS can be added to HTML documents in 3 ways. Match each way with its correct definition.

inline use the style attribute inside HTML elements internal use a <style> element in the <head> section external use a <link> element to link to an external CSS file

Which of the following is NOT a valid assignment statement? Assume length, width, and area are valid declared variables.

length * width = area;

The process of reducing the number of bits required to present information from which the original form cannot be exactly reconstructed is known as ________ compression.

lossy

The program counter keeps track of the

next instruction to be executed

Consider the following code segment. var num1 = 5; var num2 = 3; var num3 = 4; var sum = num1 + num2; num1 = num1 - num3; num3 = num3 + sum;

num1 = 1 num2 = 3 num3 = 12 sum = 8

A heuristic process

provides guidelines for finding a solution

To ________ means to take measurements at regular intervals, as in sound digitization.

sample

The quality of a sound recording is determined by the ________ and the sample precision.

sample rate

A search that uses the logical operator OR in the search squirrels OR crows requires

that either the word squirrels or the word crows be found on the page

In the story of the tortoise and the hare, the abstraction is

that slow and steady wins the race

In JavaScript, the statement var x, y = 4; will assign the value 4 to:

y only


Related study sets

Unit 3 NUR Final Exam Review Q's

View Set

Chapter 10 Pre-Assessment - Stream Landscapes

View Set

System Admin and IT Infra Services

View Set

Psychiatric-Mental Health Practice Exam HESI

View Set