Question: Complete the function that takes as input an integer for a number of days and prints the total number of seconds in that number of
Complete the function that takes as input an integer for a number of days and prints the total number of seconds in that number of days
import datetime def currentDate(x): # Student code goes here currentDate(4) #expected outcome: The total number of seconds is 345600.0. currentDate(7) #expected outcome: The total number of seconds is 604800.0.
Complete the function to return the current date
import datetime as dt def currentDate(): # Student code goes here print(currentDate()) #Expected outcome will vary, but should follow this format: The current date is 9-11-2018.
Complete the function that takes an integer as input, multiplies by e, and returns result rounded up
from math import e,ceil def mathCalculation(x): # Student code goes here #expected outcome: 9 print(mathCalculation(3)) #expected outcome: 25 print(mathCalculation(9))
Complete the following function to return a random number between 5 and 8 exclusive
import random # Complete the following function to return a random number # between 5 and 8 exclusive def getRandom(): # Student code goes here # expected output: You should only get 5s, 6s, and 7s for i in range(10): print(getRandom())
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
