Question: #Complete the code below. We've gone ahead and created #variables for the current date and current time. Now, #we want to print date with the
#Complete the code below. We've gone ahead and created
#variables for the current date and current time. Now,
#we want to print date with the format yearmonthday
#and the time with the format hour:minute:second.
#
#This is a tough one! Think about what we've learned
#about converting and putting together strings.
#Remember, we can add two strings together. For
#example:
from datetime import date
import datetime
todaysdate date.today
currenttime datetime.datetime.now
#Don't modify the code above!
#Complete the line below to print today's date with the
#form yearmonthday For example, January th
#would be
print
#Complete the line below to print the current time with
#the form hour:minute:second, such as :: Don't worry
#about the leading s for singledigit times. If it's
#:PM and seconds, the correct answer would be:
#:: because Python uses hour timeby default
print
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
