Day 4

Quiz
•
Computers
•
12th Grade - University
•
Medium
Uday Sk
Used 1+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 5 pts
Which operator has highest precedence in python and what is its associativity?
Exponent(**), Left-to-Right
Exponent(**), Right-to-left
Multiplication- left-to-right
Multiplication-Right-to-Left
Answer explanation
Exponent operator (**) has the highest precedence in python with associativity from left to right
2.
MULTIPLE CHOICE QUESTION
3 mins • 5 pts
print(6 & 2)
what will be the result of the following?
3
2
1
4
Answer explanation
6 - 110
3 - 011
----------
&-010 => 2
3.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
print(7 | 2)
what will be the output?
2
6
7
8
Answer explanation
7 - 111
2 - 010
--------
| - 1 1 1 => 7
--------
4.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
a = 1 1 0 1
b = 1 0 1 0
what will be a^b?
1111
0111
1110
0000
Answer explanation
In bitwise xor operation, the result will be 0 if the operands are same and 1 if the operands are diferent.
5.
MULTIPLE CHOICE QUESTION
5 mins • 5 pts
a = 5 (101 in binary)
what will be a<<3, when is it is 32-bit representation?
20
40
80
120
Answer explanation
in 16-bit representation, 5 in binary can be represented as:
5 => 0000000000000101
5 << 3 will be
0000000000101000
which is equal to 40
6.
MULTIPLE CHOICE QUESTION
1 min • 5 pts
a = 5
b = 3
a-=2
print(a is not b)
true
True
False
TRUE
Answer explanation
a becomes 3 when a = a-2
b = 3.
so, both will share same memory space. Hence a is not b will return False
7.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
print("hello" is str)
what will be the output?
True
False
Error
Answer explanation
"is" operator cannot be used with string literals
Error is :
SyntaxWarning: "is" with a literal. Did you mean "=="? print("hello" is str)
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Java Code Tracing Practice A

Quiz
•
9th - 12th Grade
15 questions
Exam 1 Practice

Quiz
•
University
15 questions
Python-Day-3

Quiz
•
12th Grade - University
10 questions
Python debugging

Quiz
•
University
12 questions
Python Operators

Quiz
•
12th Grade
15 questions
Python Revision Tour - I

Quiz
•
12th Grade
15 questions
Basic Python Coding

Quiz
•
11th - 12th Grade
15 questions
Python Basics

Quiz
•
University
Popular Resources on Wayground
55 questions
CHS Student Handbook 25-26

Quiz
•
9th Grade
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
10 questions
Chaffey

Quiz
•
9th - 12th Grade
15 questions
PRIDE

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
22 questions
6-8 Digital Citizenship Review

Quiz
•
6th - 8th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Chaffey

Quiz
•
9th - 12th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Lab Safety and Lab Equipment

Quiz
•
9th - 12th Grade
20 questions
Getting to know YOU icebreaker activity!

Quiz
•
6th - 12th Grade
12 questions
Macromolecules

Lesson
•
9th - 12th Grade
12 questions
Classifying Polys - 1.1

Quiz
•
10th - 12th Grade
20 questions
1.1 (b) Add / Sub/ Multiply Polynomials

Quiz
•
12th Grade