2) Write a function that takes a Fahrenheit degree f and returns its equivalent in Celsius. The formula is: C = 5 / 9 x

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

2) Write a function that takes a Fahrenheit degree f and returns its equivalent in Celsius. The formula is: C = 5 / 9 x

Post by answerhappygod »

2) Write a function that takes a Fahrenheit degree f and returns
its equivalent in Celsius. The formula is:
C = 5 / 9 x (F - 32)
3) A function is implemented with a feature to print a line when
x is found in the array A.
def better_linear_search(A, x):
for i in range(len(A)):
if A == x:
print(x,"found at",i)
return i
return -1
What is the output after running code below?
better_linear_search([17, 2, 10, 3], 10)
better_linear_search([0, 9, 9, 9], 18)
better_linear_search([12, 8, 7, 8], 8)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply