1.1-1.6 questions Flashcards
(28 cards)
Computer science allows ppl to?
- create new software
- solve problems
- all of the above
- communicate
- all of the above
_____ is based on a set of very specific rules for communicating.
- Familiar Language
- Natural Language
- Instinctive Language
- Formal Language
Formal Language
Currently there is over \_\_\_\_\_\_\_\_\_\_\_\_\_ unfilled jobs in the US in computer science. 1000 1.5 million 100,000 1 billion
1.5 million
\_\_\_\_\_\_\_\_\_\_\_\_ is designed to be very clear and work consistently every time it is used. Precise Language Formal Language Familiar Language Natural Language
Formal Language
The print command in Python can be written as PRINT or print.
True
False
False
What is wrong with the following line of code? print(Hello World) It needs " around Hello World It cannot print words It needs # around Hello World print should be PRINT
It need “ around Hello World
True or False: When running the print command as seen in the code below, the text that is output will be displayed in quotation marks.
print(“Hello there!”)
True
False
False
What is the Python command that can be used to display text and numbers on the screen? print python \+ hello
Short term memory used by the CPU. main memory input output secondary memory
main memory
Which of the following carries out the commands in programs? CPU main memory hardware power source
CPU(Central Processing Unit)
\_\_\_\_\_\_\_\_\_\_\_\_\_ is information the user sends to the computer. secondary memory input program software
input
Programs that run on hardware are called: software input computer output
software
What is output by the following line of code?
print(“I\tLove Python”)
I Love Python
I Love Python
I Love Python
I\tLove Python
I Love Python
What would be output by the following code?
print(“Hello”, end=””)
print(“ Jackson”)
HelloJackson
Hello Jackson
Hello, end=”” Jackson
Hello
Jackson
Hello Jackson
When the computer translates digital information to information humans can use, it is called \_\_\_\_\_\_\_\_\_\_\_\_\_. input output escape characters command
output
\_\_\_\_\_\_\_\_\_\_\_\_ are special output characters marked with a \. Escape sequences Output sequences Strings Print characters
Escape Sequences
What is output by the following line of code?
print(5 + 9*2)
592
23
518
28
23
What do we call notes in computer code for the programmer that are ignored by the compiler? Escape characters Print commands Output Comments
comments
This code is supposed to accept a word as input, and then print that word to the screen.
input(“Enter a word: “)
print(w)
What is the error in this code?
The input needs to be stored to a variable, w
Nothing, there is no error.
When we print(w), the w should be in quotes
Input needs to be stored with the variable w
Which of the following is a correct variable name? 7temperature low_Temperature Low temperature low--temperature
low_Temperature
What is output by the following lines of code if we input the name “Sally”?
n = input("What is your name? ") print("Hello there " + n) There is an error since the input command needs a str Hello there Sally Hello there 0 Hello there n
Hello there Sally
Which of the following is NOT true about variables?
- Variable names can be words: such as temperature or height.
- The value stored by a variable cannot be changed after it is assigned.
- Variables are a name for a spot in the computer’s memory.
- The value stored by a variable can be changed after it is assigned.
- The value stored by a variable cannot be changed after it is assigned.
Assume the user types in 7 and 10. What is output by the following?
num1 = input(“Enter a number: “)
num2 = input(“Enter a number: “)
print(num1 + num2)
17
710
No output, there is an error.
71
710
Which command converts a number to a string?
num()
int()
str()
word()
str()