Kiểm tra về mô-đun datetime trong Python

Kiểm tra về mô-đun datetime trong Python

Professional Development

10 Qs

quiz-placeholder

Similar activities

Date - Javascript

Date - Javascript

Professional Development

5 Qs

FinTech 19-1 Blockchain Python

FinTech 19-1 Blockchain Python

Professional Development

9 Qs

Python_R

Python_R

2nd Grade - Professional Development

8 Qs

Scope of Variables in Python

Scope of Variables in Python

1st Grade - Professional Development

15 Qs

Python Turtle

Python Turtle

KG - Professional Development

11 Qs

Dates in python

Dates in python

2nd Grade - Professional Development

12 Qs

Form - Input

Form - Input

Professional Development

10 Qs

FinTech 10-1 Time Series

FinTech 10-1 Time Series

Professional Development

10 Qs

Kiểm tra về mô-đun datetime trong Python

Kiểm tra về mô-đun datetime trong Python

Assessment

Quiz

Computers

Professional Development

Hard

Created by

Hoàng Cảnh

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Làm thế nào để lấy ra thời gian ngày và giờ hiện tại trong Python sử dụng mô-đun datetime?

datetime.datetime.now()

datetime.date.today()

datetime.time()

datetime.timedelta()

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Lớp nào trong mô-đun datetime đại diện cho thời gian cục bộ?

Lớp date

Lớp time

Lớp timedelta

Lớp datetime

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Làm thế nào để tạo một đối tượng date chứa ngày hiện tại trong Python?

date.today()

date.present()

date.now()

date.current()

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Làm thế nào để lấy ra thời gian giờ, phút, giây và mili giây từ một đối tượng time trong Python?

a.h, a.m, a.s, a.ms

a.hh, a.mm, a.ss, a.ms

a.hours, a.minutes, a.seconds, a.milliseconds

a.hour, a.minute, a.second, a.microsecond

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Lớp nào trong mô-đun datetime có thể chứa thông tin từ cả hai đối tượng date và time?

Lớp date

Lớp time

Lớp datetime

Lớp timedelta

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Làm thế nào để tính sự chênh lệch giữa hai khoảng thời gian ngày và giờ trong Python?

t1 / t2

t1 * t2

t1 + t2

t1 - t2

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Làm thế nào để tính tổng số giây trong một đối tượng timedelta trong Python?

t.count_seconds()

t.sum_seconds()

t.total_seconds()

t.get_seconds()

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?