Write the output of the following code:
x=2
x=5
x=x+x
print(x)
python programming quiz
Quiz
•
Other, Science, Professional Development
•
12th Grade - University
•
Hard
Md Miah
Used 16+ times
FREE Resource
26 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
Write the output of the following code:
x=2
x=5
x=x+x
print(x)
7
10
4
Error
2.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
Write the output of the following code :
x=2
y=3
x+y+5
print(x+y)
8
6
10
5
3.
MULTIPLE CHOICE QUESTION
20 sec • 5 pts
What is a keyword?
Reserved Word
Predefined Word
Keywords are part of the syntax and they cannot be used as an identifier.
All of them
4.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
Which statement will display square of number (n)
print(n * n)
print(math.pow(n,2)) # math module is already imported
All of the above
Only First
5.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of the following data types is not supported in python?
String
Number
List
Slice
6.
MULTIPLE CHOICE QUESTION
10 sec • 5 pts
Select the reserved keyword in python-
else
raise
import
All of them
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of this string operation s[2:5] , if s="hello world" -
lo
llo
llow
ell
21 questions
Turtle Graphics and Range in Python
Quiz
•
12th Grade
25 questions
C Programming
Quiz
•
12th Grade - University
21 questions
Python 3
Quiz
•
University
24 questions
Round 3: Coding Round
Quiz
•
University
26 questions
Python quiz
Quiz
•
12th Grade
25 questions
Introduction to Python and Data Analytics Basics
Quiz
•
University
23 questions
Flowcharts
Quiz
•
8th Grade - University
25 questions
round 2
Quiz
•
University
15 questions
Character Analysis
Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
10 questions
American Flag
Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension
Quiz
•
5th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25
Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers
Quiz
•
6th - 8th Grade