Programming Pandit

c/c++/c#/Javav/Python


Latest Update

Monday, November 23, 2020

Python program to display a predefined function example by G Krishna Chauhan

Source Code


a=int(input("Enter the value to take as integer"))

print("input int is :",a)

b=float(input("Enter the value to take as float"))

print("input int is :",b)

c=int(input("Enter the value to take as string"))

print("input int is :",c)

d=input("Enter the value which save it string default and showing as input function")

print("input int is :",d)

e=int(input("Enter the 1st value to find the max value"))

f=int(input("Enter the 2nd value to find the max value"))

g=max(e,f)

print("Max value between a and b is :",g)

e1=int(input("Enter the 1st value to find the min value"))

f1=int(input("Enter the 2nd value to find the min value"))

g1=min(e1,f1)

print("Minimum value between a and b is :",g1)

h=input("Enter the string to count the length")

print(len(h))



OUTPUT


Enter the value to take as integer5
input int is : 5
Enter the value to take as float5
input int is : 5.0
Enter the value to take as string6
input int is : 6
Enter the value which save it string default and showing as input function78
input int is : 78
Enter the 1st value to find the max value4
Enter the 2nd value to find the max value5
Max value between a and b is : 5
Enter the 1st value to find the min value8
Enter the 2nd value to find the min value6
Minimum value between a and b is : 6
Enter the string to count the lengthPYTHON
6

No comments:

Post a Comment