QUESTION IMAGE
Question
you want to use the dist() method. which line will allow you to enter the following code in idle?
>>dist(2,5,5,9)
5.0
from dist import math
from math import dist
from random import dist
from dist import random
In Python, to use a function like dist directly, it needs to be imported from its relevant module. Since the dist function here is likely a custom - made or a non - standard one in the context given, but if we assume it's a distance - related function, it's more likely to be in the math module (although Python's math module doesn't have a built - in dist function by default in a standard way, this is the most logical choice among the options). The correct syntax for importing a function dist from a module math is from math import dist.
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
B. from math import dist