NIELIT O Level Exam

<p>What will be the output of the following Python code if the system date is 21st June, 2017 (Wednesday)?</p><pre><span style="font-size: 14px;">import datetime<br></span><span style="font-size: 14px;">tday=datetime.date.today()<br></span><span style="font-size: 14px;">print(tday.isoweekday())</span></pre><div><br></div>

What will be the output of the following Python code if the system date is 21st June, 2017 (Wednesday)?

import datetime
tday=datetime.date.today()
print(tday.isoweekday())


यदि सिस्टम डेट 21 जून, 2017 (बुधवार) है तो निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

import datetime
tday=datetime.date.today()
print(tday.isoweekday())

A. Wed

B. Wednesday वेडन्सडे

C. 2

D. 3




Correct Answer is :

D. 3



Explanation
This code prints an integer depending on which day of the week it is. Monday-1, Tuesday-2, Wednesday-3, Thursday-4, Friday-5, Saturday-6, Sunday-7. Hence the output of the code shown above is 3.
Latest Current Affairs 2025 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