014. A - D Extra Help

014. A - D Extra Help

9th - 12th Grade

4 Qs

quiz-placeholder

Similar activities

Quiz on Introduction to Programming with Python

Quiz on Introduction to Programming with Python

9th - 12th Grade

9 Qs

Quick Review | Motion Presets

Quick Review | Motion Presets

12th Grade

9 Qs

9th L-5

9th L-5

9th Grade

9 Qs

Величини. Змінні. Вказівка присвоювання

Величини. Змінні. Вказівка присвоювання

1st - 12th Grade

9 Qs

Python basics

Python basics

6th - 10th Grade

8 Qs

Sains Komputer Tingkatan 5 - 3.2.7 Membina, mengemaskini

Sains Komputer Tingkatan 5 - 3.2.7 Membina, mengemaskini

KG - 12th Grade

8 Qs

Quiz de JavaScript

Quiz de JavaScript

9th - 12th Grade

9 Qs

Nhập môn lập trình C

Nhập môn lập trình C

9th - 12th Grade

9 Qs

014. A - D Extra Help

014. A - D Extra Help

Assessment

Quiz

Computers

9th - 12th Grade

Easy

Created by

Robert Giordano

Used 3+ times

FREE Resource

4 questions

Show all answers

1.

FILL IN THE BLANK QUESTION

1 min • 1 pt

In order to use the date and time features in Python, we have to import a module.

Fill in the import statement.

import _________

2.

DROPDOWN QUESTION

1 min • 1 pt

Fill in the blanks to get the current date from the computer

import datetime

curr_date = ​ (a)   .​ (b)   .​ (c)   ()

print(curr​_date)

datetime
now
date
dt
time

3.

DRAG AND DROP QUESTION

1 min • 1 pt

Drag and drop to complete the code to create a date object.

import datetime

curr_date = datetime.datetime.now()

month = curr​_date.month

year = curr_date. ​year

day = curr_date.​day

today = ​ datetime.​ (a)   (​ ​ (b)   , ​ (c)   , ​ (d)   )

print(today)

date
year
month
day
datetime

4.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Fill in the blank to print the difference between the 2 time objects in the number of days.

import datetime

date1 = datetime.date(2023, 9, 1)

date2 = datetime.date(2023, 12, 25)

diff = (date2 - date1).____

print(diff)