MCQ Answer

<p>What will be the output of the following Python code if the system date is 18th June, 2017 (Sunday)?</p><pre><span style="font-size: 14px;">import datetime<br></span><span style="font-size: 14px;">tday=datetime.date.today()&nbsp;<br></span><span style="font-size: 14px;">print(tday)</span></pre><div><br></div>

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)



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

import datetime
tday=datetime.date.today() 
print(tday)
Topic : Modules in Python

A. 18-06-2017

B. 06-18-2017

C. 2017-06-18

D. Error एरर




Correct Answer is :

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