Report Bug

Qus

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())
Qus

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

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


A. Wed
B. Wednesday
C. 2
D. 3


Solution
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.
CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online Exam Quiz O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Best Website and Software Company in Allahabad Website development Company in Allahabad