Tuesday, December 27, 2022

MFIB Comma Separated Integers

Fill in the blanks with code so that the program must accept three integers separated by a space and print them separated by a comma as the output

Input Format:

The first line contains three integers separated by a space.


Output Format:

The first line contains three integers separated by a comma.


Example Input/Output:

217 18

21,7,18


Solution:

X, Y, Z = map(int, input().split()) 

print(X, Y, Z,sep="," )

MFIB Maximum of Three

Fill in the blanks with code so that the program must accept three integers X, Y and Z as the input. The program must print the maximum integer among the three integers as the output.

Input Format:

The first line contains X, Y and Z separated by a space.


Output Format:

The first line contains the maximum integer among the three integers.


Example Input/Output :

Input:

589
9

Solution:

X, Y, Z = [int(val) for val in input().split()]

print(X if X>Y and X>Z else Y if Y>Z else Z )

MFIB- All Unique or Not

Fill in the blanks with code so that the program accepts a list of integers and prints YES if all the integers in the list are unique. Else the program prints NO as the output.

Input Format:

The first line contains the list of integers separated by a space.

Output Format:

The first line contains YES or NO.

Example Input/Output :

7893

YES


Solution:


numList=list(map(int,input().split()))

if len(numList)==len(set(numList)):

    print("YES")

else:

    print("NO")

MFIB Comma Separated Integers

Fill in the blanks with code so that the program must accept three integers separated by a space and print them separated by a comma as the ...