Online Exam Quiz
Menu mobile
Home
GK Today
Subject
CCC Online Test
O Level Online Test
Coding
Report Bug
Qus: <p>What will be the output of the following Python code if the system date is: 6/19/2017</p><pre><span style="font-size: 14px;">import datetime<br></span><span style="font-size: 14px;">tday=datetime.date.today()<br></span><span style="font-size: 14px;">tdelta=datetime.timedelta(days=10) <br></span><span style="font-size: 14px;">print(tday+tdelta)</span></pre><div><br></div>
Qus<p>यदि सिस्टम का दिनांक है: 6/19/2017, तो निम्न पायथन कोड का आउटपुट क्या होगा</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">import datetime<br></span><span style="font-size: 14px;">tday=datetime.date.today()<br></span><span style="font-size: 14px;">tdelta=datetime.timedelta(days=10) <br></span><span style="font-size: 14px;">print(tday+tdelta)</span></pre>
A. 2017-16-19
B. 2017-06-9
C. 2017-06-29
D. एरर
Solution
C. 2017-06-29
Explanation
The code shown above will add the specified number of days to the current date and print the new date. On adding ten days to 6/19/2017, we get 6/29/2017. Hence the output is: 2017-06-29.
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