1. Largest Odd Revisited: Write a program that examines three variables x, y, and z and prints out the largest odd numbe
Posted: Sat Feb 19, 2022 3:21 pm
1. Largest Odd Revisited: Write a program that examines three variables x, y, and z and prints out the largest odd number amongst them. If none are odd, print out a message indicating this. For this code, use a 'for' or 'while loop, conditionals, and a sorting function "sort' from the NumPy package). Make sure to add some comments in your code to indicate what appropriate lines of code are doing.
X = # largest odd revisited import numpy as np : 1; y = 7; z = 1000 # L = np.array([x, y, z]) Ls = np.sort(L)[::-1] # reverse sorted np array so largest first no_odds = True J for 1 in Ls: if l%2 != 0: print(f'??') else: pass if no odds ==True: print('no odds!')