qobjects = [
{
question: "Consider the following code:import datetime
x = datetime.datetime
Which syntax will print the current date?",
options: [
"print(x.datetime())",
"print(x.date())",
"print(x.now())"
],
correct: 2
},
{
question: "Consider the following code:import datetime
x = datetime.datetime.now()
Which syntax will print the name of the weekday?",
options: [
"print(x.strftime('%A'))",
"print(x.ftime('%A'))",
"print(x.fdate('%A'))"
],
correct: 0
},
{
question: "When formatting date objects into readable strings, which syntax is used to return the month name, full version?",
options: [
"print(x.strftime('%B'))",
"print(x.strftime('%M'))",
"print(x.strftime('%N'))"
],
correct: 0
},
{
question: "Consider the following code:import datetime
x = datetime.datetime(2024, 8, 20)
print(x.strftime('%d'))
What will be the printed result?",
options: [
"19",
"20",
"21"
],
correct: 1
}
]