CSHII UNIT 1 QUIZ

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/57

flashcard set

Earn XP

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

58 Terms

1
New cards

Computer Science

The study of the principles and use of computers.

2
New cards

print( )

A command that displays text and numbers on the screen.

3
New cards

Compiler

A program that translates written code into machine language.

4
New cards

Computer

An electronic device consisting of hardware and software.

5
New cards

CPU

A computer component that carries out a program's instructions.

6
New cards

Hardware

The physical machine; any part of a computer that you can touch.

7
New cards

Input

Information sent to the computer by the user, in the form of letters, numbers, or symbols.

8
New cards

Main Memory

Short term, temporary memory. When computer is powered off, all information here is lost.

9
New cards

String

An object in Python that stores letters, numbers and words. Not used for calculations.

10
New cards

Program

Instructions that a computer follows, written in code.

11
New cards

Secondary Memory

Long term memory, or storage. Preserved when a computer is powered off.

12
New cards

Software

Programs that run on hardware.

13
New cards

Escape Sequences

Special sequences marked with the \ symbol. Can allow you to make a new line, tab, print a quotation mark, or print a backslash.

14
New cards

Comment

A note written in computer code for the programmer to read, that the computer ignores. Marked in Python with a # symbol.

15
New cards

Output

Digital information displayed or sent to the user by the computer, in a form that humans can interpret (sound, video, text, etc.).

16
New cards

Variable

A name for a spot in the computer's memory where information can be stored.

17
New cards

int( )

A function that translates strings into integers.

18
New cards

str( )

A function that tells Python to handle the value in the parentheses as a string, not as a number.

19
New cards

Analog

Data and information in the real world that can be measured continuously, instead of discretely. Example: volume or color.

20
New cards

Digital

Data and information in the real world that can be measured discretely or numerically, instead of continuously. Example: binary data stored in a computing device.

21
New cards

Binary

A number system based on two numbers, 0 and 1.

22
New cards

Decimal

A number system based on ten, the number system we normally use.

23
New cards

Integer

Any whole number (either positive or negative), and zero.

24
New cards

Integrated Development Environment (IDE)

Also called a programming environment, it allows users to write a program, run the program, and debug the program all within one application.

25
New cards

Operating System

The software that supports a computer's basic functions, such as controlling computer memory, scheduling tasks, and running applications.

26
New cards

Syntax

The rules that define the written structure of a programming language.

27
New cards

Concatenation

Adds two strings together.

28
New cards

Typecasting

The process of converting the value of one data type to another data type.

29
New cards

Natural language

is what humans use to communicate with each other

30
New cards

Python is an example of

formal language

31
New cards

Which of the following falls under the field of computer science?

(All of the above) Algorithms, data, logical thinking

32
New cards

Why do we need to use languages with consistent rules?

In order for the computer to interpret the same words and phrases the same way every time.

33
New cards

True or False: print can only be used to output words

FALSE

34
New cards

What is wrong with the following line of code?

print "Hello + World"

There should be parentheses around the string

35
New cards

Which of the following can we use to output text to the screen?

 print

36
New cards

True or False: Two different strings can be printed using one print statement by "adding" them with a + symbol

True

37
New cards

Which of the following is true about software and hardware?

Software refers to programs that run on the physical hardware of a computer

38
New cards

Main memory is….

lost when the computer is powered off

39
New cards

Which of the following are tasks carried out by the compiler?

Checks code for mistakes, translating commands into binary machine code

40
New cards

Instructions are carried out by which part of the computer?

CPU

41
New cards

Escape characters are special output characters that begin with a

\

42
New cards

What is output by the following line of code?

print("I/tLove\tPython")

I/tLove    Python

43
New cards

What is output by the following line of code?

print(5*2 + 9)

19

44
New cards

Which of the following will be ignored by the compiler when written as code?

#print

45
New cards

When the computer translates digital information to information humans can use, it is called

Output

46
New cards

What is output by the following lines of code?

print("Hi", end="")

print("\tRonald")

Hi    Ronald

47
New cards

Which of the following is a valid variable name?

pi (cannot start with numbers, uppercase, or have a space)

48
New cards

What is output by the following lines of code if we input the number 13?

n = input("What is your number? ")

print("Your number is + n")

Your number is + n

49
New cards

This code is supposed to accept a word as input, and then print that word to the screen.

x = input("Enter a word: ")

print("x")

What is the error in the code?

x should not be in quotes inside the print statement

50
New cards

Which of the following is NOT true about variables?

Variables can only store strings

51
New cards

Assume the user types in 9 and 13. What is output by the following?

num1 = int(input("Enter a number: "))

num2 = int(input("Enter a number: "))

print(num1 + num2)

22

52
New cards

Which command can be used to convert variables into an integer?

int()

53
New cards

Which of the following is NOT true about strings?

Strings can be used to perform arithmetic operations such as addition

54
New cards

What is wrong with the following code?

num1 = int(input("Enter a number: "))

num2 = int(input("Enter a number: "))
print("The product is " + (num1 * num2))

There should be a str() to convert the product to a string

55
New cards

Which of the following lines of code correctly inputs the user's name?

n = str(input("Enter: "))

56
New cards

_________ data best describes the type of data that is stored inside computers

digital

57
New cards

Using a keyboard to write an email is an example of

Input

58
New cards

Listening to music through headphones is an example of

Output