l1 = ['I like', 'I love']
l2 = ['fan cake', 'kiwi juice', 'espresso']
for front in l1:
for back in l2:
print(front, back)
You can access elements in the list in the form for in.
arr = []
print('Enter 5 numbers :')
for _ in range(5):
arr.append(int(input()))
print('Hap:', sum(arr))
print('Average:', sum(arr)/len(arr))
print('Max:', max(arr))
print('Min: ', min(arr))
You can also use the method given in the problem.
I would like you to study more about the list data type :D
© 2024 OneMinuteCode. All rights reserved.