Report Bug

Qus

What will be the output of the following Python code if the system date is 18th June, 2017 (Sunday)?

tday=datetime.date.today()

print(tday.weekday())

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


A. 6
B. 1
C. 0
D. 7


Solution
A. 6



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