Python Dates

Python Dates

12th Grade

10 Qs

quiz-placeholder

Similar activities

Radicals - Part 1

Radicals - Part 1

9th - 12th Grade

10 Qs

Easy Baseball quiz

Easy Baseball quiz

3rd Grade - Professional Development

6 Qs

C16 POA Theory Profitability

C16 POA Theory Profitability

9th - 12th Grade

11 Qs

The quiz

The quiz

4th Grade - University

12 Qs

Spreadsheets - H Admin

Spreadsheets - H Admin

12th Grade

14 Qs

Riddles for kids

Riddles for kids

KG - University

12 Qs

HTML5 Quiz

HTML5 Quiz

12th Grade

15 Qs

Computer1

Computer1

1st Grade - Professional Development

10 Qs

Python Dates

Python Dates

Assessment

Quiz

Other

12th Grade

Medium

Created by

Amy Austin

Used 2+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What module in Python is used to work with dates?

dateutil

datetime

time

calendar

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method is used to format date objects into readable strings?

strftime()

strptime()

format()

fdate()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the default value for the hour parameter in the datetime() class?

0

None

12

1

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid directive for the strftime() method?

%B

%R

%O

%L

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you create a date object in Python?

Using the createDate() function

Using the newDate() method

Using the date() function

Using the datetime() class

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the '%d' directive represent in the strftime() method?

Month as a zero-padded decimal number

Day of the week as a decimal number

Year without century as a zero-padded decimal number

Day of the month as a zero-padded decimal number

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is not a method of the datetime module?

datetime.strftime()

datetime.now()

datetime.format()

datetime.strptime()

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?