Report Bug
Qus : what will be the output of :print( 22//3+3/3)
Qusनिम्नलिखित कोड का आउटपुट क्या होगा? print( 22//3+3/3)

A. 4
B. 4.0
C. 8
D. 8.0


Solution
D. 8.0



Explanation

Step-by-Step Evaluation:

Integer Division (//):

22 // 3 performs floor division (integer division). It divides 22 by 3 and truncates the result to an integer:

22//3=7

Floating-Point Division (/):

3 / 3 performs regular division and returns a floating-point number:

3/3=1.0

Addition:

Add the results of the two operations:

7+1.0=8.0




Report Bug