Python : Modules in Python

<p>यदि 18 अगस्त, 2016 को सिस्टम डेट निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style=""><font color="#333333" style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">import datetime<br></span></font><font color="#333333" style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">d=datetime.date.today()<br></span></font><font color="#333333" style=""><span style="font-size: 14px; letter-spacing: 0.14px;">print(d.</span><span style="font-size: 14px;">month</span><span style="font-size: 14px; letter-spacing: 0.14px;">)</span></font></pre> , <p>What will be the output of the following Python code if the system date is 18th August, 2016?</p> <pre><font color="#333333"><span style="font-size: 14px;">import datetime<br></span></font><font color="#333333"><span style="font-size: 14px;">d=datetime.date.today()<br></span></font><font color="#333333"><span style="font-size: 14px;">print(d.month)</span></font></pre>

<p>यदि 18 अगस्त, 2016 को सिस्टम डेट निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style=""><font color="#333333" style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">import datetime<br></span></font><font color="#333333" style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">d=datetime.date.today()<br></span></font><font color="#333333" style=""><span style="font-size: 14px; letter-spacing: 0.14px;">print(d.</span><span style="font-size: 14px;">month</span><span style="font-size: 14px; letter-spacing: 0.14px;">)</span></font></pre>

<p>What will be the output of the following Python code if the system date is 18th August, 2016?</p> <pre><font color="#333333"><span style="font-size: 14px;">import datetime<br></span></font><font color="#333333"><span style="font-size: 14px;">d=datetime.date.today()<br></span></font><font color="#333333"><span style="font-size: 14px;">print(d.month)</span></font></pre>
A. अगस्त
(August)

B. Aug

C. 08

D. 8



Correct Answer :

D. 8



Explanation
The code shown above prints the month number from the system date. Therefor the output will be 8 if the system date is 18th August, 2016.
Latest Current Affairs 2026 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test , CCC MCQ Python Coding Tutorials Best Computer Training Institute in Prayagraj (Allahabad) O Level NIELIT Study material and Quiz Website development Company in Allahabad