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.
Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2026 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 Best Website and Software Company in Allahabad