Report Bug

Qus

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

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

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

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


A. 18-06-2017
B. 06-18-2017
C. 2017-06-18
D. Error


Solution
C. 2017-06-18



Explanation
The code shown above prints the system date in the format yyyy-mm-dd. Hence the output of this code is: 2017-06-18.
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