Computer Science- Test 1 Review

¡Supera tus tareas y exámenes ahora con Quizwiz!

The symbol used to create a comment is:

#

What is the correct order for the steps the compiler uses in translating code?

Check for mistakes, Translate commands to machine language, Run the commands

Which of the following about computers is NOT true?

Computing devices translate digital to analog information in order to process the information.

What is one downside of converting analog information to a digital format?

Some information may be lost when it is converted.

The two basic categories of variable data types are:

Strings and numbers

What is output by the following? print ("Twinkle, \ttwinkle, \tlittle star")

Twinkle, twinkle, little star

What is output by the following? Assume the user enters 5 and 4 x = input ("Enter a number: ") y = input ("Enter a number: ") print ("Values: " + x + y)

Values: 54

Consider the following code: x = input ("What year is it?") print x The value stored in x is:

a String

Consider the following code: x = "apple" y = x z = "banana" print (x + " " + y + "\n" + z) What is output?

apple apple banana

Consider the following code: print ("computer" + "science") What is output?

computerscience

Which of the following correctly inputs two numbers and print the sum?

n1 = int(input("Enter a number: ")) n2 = int(input("Enter a number: ")) print("The answer is: " + str(n1+n2))

Which of the following controls computer memory?

operating system

Which of the following is NOT an input device?

printer

Which of the following will correctly output: I know there's a proverb which that says "To err is human," but a human error is nothing to what a computer can do if it tries. - Agatha Christie

quote = "\"To err is human,\"" print ("I know there's a proverb which that says \n"+ quote + "\nbut") print ("a human error is nothing to what a computer") print ("can do if it tries.\n\n- Agatha Christie")

What is output by the following? print (type("95"))

<type 'str'>

What is input?

Putting information into the computer

When do we use numbers instead of strings?

When you need to do calculations

What command is used to change a string into a number?

int

Which of the following is a legal variable name?

temperatureAM

Which of the following are true about main and secondary memory?

Main memory is short term memory used by the CPU in processing commands, secondary memory is more permanent and used for storage.


Conjuntos de estudio relacionados

American History Chapter 7 Section 3

View Set

Ch 19 Analysis and Monitoring of Gas Exchange

View Set

AP Psych Ch. 4,5,6,8,9,10,11,12,13,14

View Set

Study Guide - Property and Casualty Exam

View Set

Chapt 25 Cardiovascular Function Med Surg

View Set

Implementing and Supporting Servers 2012/R2 Test 2 (chapter 5-8)

View Set

Chapter 3 quiz San Marcos A and P

View Set

Paleogeography and Biodiversity in the cenozoic

View Set