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
Note: This is a direct quote from Agatha Christie's novel, Hallowe'en Party. The grammar shown here is as it is written in the novel.
Intro to CS Midterm Exam

Flashcard
•
Computers
•
12th Grade
•
Hard
Quizizz Content
FREE Resource
Student preview

19 questions
Show all answers
1.
FLASHCARD QUESTION
Front
Back
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")
2.
FLASHCARD QUESTION
Front
The symbol used to create a comment is:
Back
#
3.
FLASHCARD QUESTION
Front
Consider the following code:
print("computer" + "science")
What is output?
Back
computerscience
4.
FLASHCARD QUESTION
Front
Consider the following code:
x = input("What year is it?")
print(x)
The value stored in x is:
Back
a String
5.
FLASHCARD QUESTION
Front
Which of the following correctly inputs two numbers and print the sum? Options: n1 = input("Enter a number: ") n2 = input("Enter a number: ") print("The answer is: " + int(n1+n2)), n1 = input("Enter a number: ") n2 = input("Enter a number: ") print("The answer is: " + str(n1+n2)), n1 = int(input("Enter a number: ")) n2 = int(input("Enter a number: ")) print("The answer is: " + int(n1+n2)), n1 = int(input("Enter a number: ")) n2 = int(input("Enter a number: ")) print("The answer is: " + str(n1+n2))
Back
n1 = int(input("Enter a number: ")) n2 = int(input("Enter a number: ")) print("The answer is: " + str(n1+n2))
6.
FLASHCARD QUESTION
Front
Consider the following code:
x = "apple"
y = x
z = "banana"
print(x + " " + y + "\n" + z)
What is output?
Back
apple apple
banana
7.
FLASHCARD QUESTION
Front
What happens if the user types in A when executing the code: x = int(input("Enter a number: "))
print (x)?
Back
This would cause an error: an integer variable cannot store a string.
Create a free account and access millions of resources
Similar Resources on Quizizz
14 questions
Python Basics & Syntax

Flashcard
•
10th - 12th Grade
20 questions
Intro to CS Semester 1 Unit 2 flashcard

Flashcard
•
12th Grade
14 questions
AP CS ArrayLists

Flashcard
•
12th Grade
15 questions
Introduction to Java

Flashcard
•
University
13 questions
Fall Semester Exam Review (Units 1, 2)

Flashcard
•
12th Grade
16 questions
Python Basics Unit 3.1

Flashcard
•
12th Grade
11 questions
Computer Programming

Flashcard
•
University
20 questions
Unit 3 Python TEST

Flashcard
•
11th - 12th Grade
Popular Resources on Quizizz
10 questions
Chains by Laurie Halse Anderson Chapters 1-3 Quiz

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
15 questions
Character Analysis

Quiz
•
4th Grade
12 questions
Multiplying Fractions

Quiz
•
6th Grade
30 questions
Biology Regents Review #1

Quiz
•
9th Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
50 questions
Biology Regents Review: Structure & Function

Quiz
•
9th - 12th Grade
Discover more resources for Computers
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
50 questions
Biology Regents Review: Structure & Function

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
14 questions
Attributes of Linear Functions

Quiz
•
9th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University
50 questions
Biology Regents Review 2: Ecology

Quiz
•
9th - 12th Grade
20 questions
Investing

Quiz
•
9th - 12th Grade