Input and Output Python

Quiz
•
Computers
•
10th Grade
•
Hard
JUSILDA VREKA
Used 7+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
10 sec • 2 pts
If mark is a variable that stores the mark scored by a student, what is the code to print the mark in the format,
“Your score is <mark>”
print (“Your score is", mark)
print ("Your score is" + mark)
print ("Your score is" + int(mark))
print ("Your score is" + str(mark))
2.
MULTIPLE CHOICE QUESTION
10 sec • 2 pts
If total is a variable that stores a total of 5 numbers, what is the code to print the total in the format,
“The total of 5 numbers is <total>”
print (“The total of 5 numbers is “+ int(total))
print (“The total of 5 numbers is “+ float(total))
print (“The total of 5 numbers is ", str(total))
print ("The total of 5 numbers is "+ str(total))
3.
MULTIPLE CHOICE QUESTION
10 sec • 2 pts
Which operator concatenates two strings?
Operator ,
Operator +
Operator –
Operator \
4.
MULTIPLE CHOICE QUESTION
10 sec • 2 pts
What is the significance of adding end=“ “ at the end of a print statement?
To print multiline strings.
To print the next statement in the same line with a space in between them.
To print statements in two different lines.
To insert a tab character between two statements.
5.
MULTIPLE CHOICE QUESTION
10 sec • 2 pts
Which of the following statements is used to print multiline strings as given.
print('70% of Earth’s surface
is covered in
water’)
print(“70% of Earth’s surface
is covered in
water”)
print("""70% of Earth’s surface
is covered in
water""")
print(“70% of Earth’s surface\
is covered in\
water”)
6.
MULTIPLE CHOICE QUESTION
10 sec • 2 pts
If customerName = “Bob” and phoneNum = “0171983055”, what is the output when the statement print(customerName + phoneNum) is executed?
Bob 0171983055
Bob0171983055
Bob+0171983055
TypeError
7.
MULTIPLE CHOICE QUESTION
10 sec • 2 pts
he Python output when a print statement is executed is given. What is the correct print statement?
print("\nA fact\n Earth's gravity\nis not\nuniform")
print("\nA fact\n \nEarth's gravity\nis not\n\nuniform")
print("\nA fact\n \nEarth's gravity\nis not\nuniform")
print("A fact\n \nEarth's gravity\nis not\nuniform")
Create a free account and access millions of resources
Similar Resources on Wayground
12 questions
Introduction to Python Programming

Quiz
•
7th - 10th Grade
10 questions
Lớp 10: Câu hỏi TN củng cố kiến thức

Quiz
•
10th Grade
15 questions
Python - тест

Quiz
•
1st - 12th Grade
10 questions
KS4 Programming Techniques (1)

Quiz
•
8th - 10th Grade
10 questions
Python списки

Quiz
•
10th Grade
15 questions
CP M4 Repetition & Loops

Quiz
•
9th - 12th Grade
7 questions
النشاط الختامي لدرس جملة الإدخال

Quiz
•
10th Grade
11 questions
J277 Programming - Data Types

Quiz
•
9th - 11th Grade
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade