1/57
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Computer Science
The study of the principles and use of computers.
print( )
A command that displays text and numbers on the screen.
Compiler
A program that translates written code into machine language.
Computer
An electronic device consisting of hardware and software.
CPU
A computer component that carries out a program's instructions.
Hardware
The physical machine; any part of a computer that you can touch.
Input
Information sent to the computer by the user, in the form of letters, numbers, or symbols.
Main Memory
Short term, temporary memory. When computer is powered off, all information here is lost.
String
An object in Python that stores letters, numbers and words. Not used for calculations.
Program
Instructions that a computer follows, written in code.
Secondary Memory
Long term memory, or storage. Preserved when a computer is powered off.
Software
Programs that run on hardware.
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.
Comment
A note written in computer code for the programmer to read, that the computer ignores. Marked in Python with a # symbol.
Output
Digital information displayed or sent to the user by the computer, in a form that humans can interpret (sound, video, text, etc.).
Variable
A name for a spot in the computer's memory where information can be stored.
int( )
A function that translates strings into integers.
str( )
A function that tells Python to handle the value in the parentheses as a string, not as a number.
Analog
Data and information in the real world that can be measured continuously, instead of discretely. Example: volume or color.
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.
Binary
A number system based on two numbers, 0 and 1.
Decimal
A number system based on ten, the number system we normally use.
Integer
Any whole number (either positive or negative), and zero.
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.
Operating System
The software that supports a computer's basic functions, such as controlling computer memory, scheduling tasks, and running applications.
Syntax
The rules that define the written structure of a programming language.
Concatenation
Adds two strings together.
Typecasting
The process of converting the value of one data type to another data type.
Natural language
is what humans use to communicate with each other
Python is an example of
formal language
Which of the following falls under the field of computer science?
(All of the above) Algorithms, data, logical thinking
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.
True or False: print
can only be used to output words
FALSE
What is wrong with the following line of code?
print "Hello + World"
There should be parentheses around the string
Which of the following can we use to output text to the screen?
print
True or False: Two different strings can be printed using one print statement by "adding" them with a + symbol
True
Which of the following is true about software and hardware?
Software refers to programs that run on the physical hardware of a computer
Main memory is….
lost when the computer is powered off
Which of the following are tasks carried out by the compiler?
Checks code for mistakes, translating commands into binary machine code
Instructions are carried out by which part of the computer?
CPU
Escape characters are special output characters that begin with a
\
What is output by the following line of code?
print("I/tLove\tPython")
I/tLove Python
What is output by the following line of code?
print(5*2 + 9)
19
Which of the following will be ignored by the compiler when written as code?
When the computer translates digital information to information humans can use, it is called
Output
What is output by the following lines of code?
print("Hi", end="")
print("\tRonald")
Hi Ronald
Which of the following is a valid variable name?
pi (cannot start with numbers, uppercase, or have a space)
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
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
Which of the following is NOT true about variables?
Variables can only store strings
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
Which command can be used to convert variables into an integer?
int()
Which of the following is NOT true about strings?
Strings can be used to perform arithmetic operations such as addition
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
Which of the following lines of code correctly inputs the user's name?
n = str(input("Enter: "))
_________ data best describes the type of data that is stored inside computers
digital
Using a keyboard to write an email is an example of
Input
Listening to music through headphones is an example of
Output