Report Bug

Qus

What will be the output of the following expression ?

print (7//2)
print (-7//2)
Qus

निम्नलिखित कोड का आउटपुट क्या होगा ?

print (7//2)
print (-7//2)


A. 3 -3
B. 4 -4
C. 3 -4
D. 3 3


Solution
C. 3 -4



Explanation

// operator known as floor division which return the floor value of division 

7//2 = floor(7/2) => floor(3.5) =>3

-7//2= floor(-7/2) => floor(-3.5) => -4

so the correct answer is: 3 -4











Latest Current Affairs 2025 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2025 Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz