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 2021 CCC Practice Test Hindi 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