Python Dates

Python Dates

12th Grade

10 Qs

quiz-placeholder

Similar activities

SS Ch 9 Test Review The Flow of Food: Service

SS Ch 9 Test Review The Flow of Food: Service

9th - 12th Grade

15 Qs

Olivia Rodrigo lyric quiz

Olivia Rodrigo lyric quiz

KG - Professional Development

11 Qs

St. Patrick's Day Trivia

St. Patrick's Day Trivia

KG - 12th Grade

10 Qs

Easy Baseball quiz

Easy Baseball quiz

3rd Grade - Professional Development

6 Qs

Welcome to the Media Center: A Library Introduction

Welcome to the Media Center: A Library Introduction

9th - 12th Grade

9 Qs

Needlecraft Quiz

Needlecraft Quiz

9th - 12th Grade

15 Qs

Library Skills-2

Library Skills-2

9th - 12th Grade

15 Qs

Spreadsheets - H Admin

Spreadsheets - H Admin

12th Grade

14 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?