What will be the output of the following Python expression?
print(round(4.576))
4.5
5
4
4.6
What will be the output of the following Python code?
import datetime d=datetime.date(2017,6,18) print(d)
Error
2017-06-18
18-06-2017
06-18-2017
What will be the output of the following Python code if the system date is 18th August, 2016?
import datetime d=datetime.date.today() print(d.month)
August
Aug
08
8
What will be the output of the following Python code if the system date is 18th June, 2017 (Sunday)?
import datetime tday=datetime.date.today() print(tday)
import datetime tday=datetime.date.today() print(tday.weekday())
6
1
0
7
What will be the output of the following Python code if the system date is 21st June, 2017 (Wednesday)?
import datetime tday=datetime.date.today() print(tday.isoweekday())
Wed
Wednesday
2
3
What will be the output of the following Python code if the system date is: 6/19/2017
import datetime tday=datetime.date.today() tdelta=datetime.timedelta(days=10) print(tday+tdelta)
2017-16-19
2017-06-9
2017-06-29
datetime.utc()
datetime.datetime.utc()
datetime.utcnow()
datetime.datetime.utcnow()
import time print(time.asctime())
Current date only
UTC time
Current date and time
Current time only
Pause the code for the specified number of seconds
Return the specified number of seconds, in terms of milliseconds
Stop the execution of the code
Return the output of the code had it been executed earlier by the specified number of seconds
import random
random.h
import.random
random.random
What will be the output of the following Python function, assuming that the random module has already been imported?
import random random.uniform(3,4)
Either 3 or 4
Any integer other than 3 and 4
Any decimal value between 3 and 4
What will be the output of the following Python function if the random module has already been imported?
import random print(random.randint(3.5,7))
Any integer between 3.5 and 7, including 7
Any integer between 3.5 and 7, excluding 7
The integer closest to the mean of 3.5 and 7
seed
randomise
shuffle
uniform
(0,1)
(0,1]
[0,1]
[0,1)
import random print(random.randrange(0,91,5))
10
18
79
95
Which can be the output of the following Python code?
import random print(random.randrange(1,100,10))
32
67
91
80
True
None
2.3
none of the mentioned