NIELIT O Level Exam

What will be the output : 24//6%3,24//4//2

What will be the output : 24//6%3,24//4//2

इसका आउटपुट क्या होगा: 24//6%3,24//4//2

A. (1,3)

B. (2,5)

C. (2,1)

D. (4,8)




Correct Answer is :

A. (1,3)



Explanation


Let's break down the expression:

24 // 6 % 3:


First, perform the integer division 24 // 6, which results in 4.

Then, calculate the modulus (%) with 3, resulting in 1.

24 // 4 // 2:


First, perform the integer division 24 // 4, which results in 6.

Then, perform the integer division 6 // 2, resulting in 3.

Now, putting both results together:


24 // 6 % 3 is 1

24 // 4 // 2 is 3

So, the output will be 1, 3

Latest Current Affairs 2024 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online MBA 2 years Online MCA Online BCA Best Website and Software Company in Allahabad