Answer:
The complete program is as follows:
def convert_distance(miles):
km = miles * 1.6 # approximately 1.6 km in 1 mile
return km
my_trip_miles = 55
# 2) Convert my_trip_miles to kilometers by calling the function above
my_trip_km =convert_distance(my_trip_miles) #3) Fill in the blank to print the result of the conversion
# 4) Calculate the round-trip in kilometers by doubling the result,
print("The distance in kilometers is " +str(my_trip_km))
# and fill in the blank to print the result
print("The round-trip in kilometers is " + str(my_trip_km * 2))
Explanation:
<em>The program is self-explanatory because I used the same comments in the original question.</em>
Answer:
i don't want ur email but here's a joke more like a riddle: I speak without a mouth and hear without ears. I have no body, but I come alive with wind. What am I?
answer an echo
Explanation:
When you first purchase a notebook, make sure you have a RECOVERY CD. It enables the restoration of the notebook computer.
A recovery disc is a disc that enables to restore the computer to the same condition when it was bought.
Moreover, a recovery drive refers to a separate partition in the notebook that must contain the required files to restore the device if the system becomes unstable.
A recovery disc can be considered as a drive used to keep a backup of the files (e.g., images) and other types of restoration data.
Learn more about recovery disc here:
brainly.com/question/14217813
Answer:
see explaination for program code
Explanation:
scalar_product = 0
li=[]
li2=[]
#reading numbers1.txt and numbers2.txt intoli and li2 respectively
with open('numbers1.txt') as n1, open('numbers2.txt') as n2:
for line1 in n1:
li.append(int(line1))
for line2 in n2:
li2.append(int(line2))
#storing min list size into variable l
a=len(li)
b=len(li2)
if a<b:
l=a
else:
l=b
#calculating scalar product
for i in range(l):
scalar_product=scalar_product+li[i]*li2[i]
print("scalar product is",scalar_product)
Answer:
list = {10, 18, 24, 75, 70, 20, 60, 35}
Explanation:
Selection is a sorting algorithm that will set a cursor position and search for a minimum number from the list. When the minimum number is found, that minimum number will be swapped with the number in the cursor position. Only one number will be swapped and sorted in one iteration of outer loop. To sort the next number in the following outer loop iteration, the cursor will be moved to the next position and repeat the same search and swapping process as in the first iteration. When finishing all the iterations of outer loop, all numbers shall be sorted in ascending order.