Python Questions
Python Questions
input
# Initialize variables
a=0
b=1
sum = 0
3) Write a program to take a list as an input and and find the max and min element of
the list without using max and min function and calculate the product of the maximum
and minimum value.
# Display results
print("Minimum value:", min_val)
print("Maximum value:", max_val)
print("Product of min and max:", product)
4) Write a program to take a list of string as inputs and reverse each string in the list and
print the list
Eg [“sky”,”blue”,”red”] output [“yks”,”eulb”,”der”]
5) Write a program to take input of two strings as input and find out and store only the
common elements between the two strings in a 3rd string and print the reverse of
that 3rd string