Some variable functions.

 Some variable functions.

It is a Program which first takes input from user for a data and then it print it's length by len(variable name) function , tell it's type of which the data is by type(variable name) function then tell it is numeric value or not by true and false by variable_name.isnumeric() function, replace(" "," ") for replacing ,  uppercase and lowercase, and x.isalnum() for having space or not..
#Day3
print("enter your data")
x=input()
print("length of your data is",len(x))
print("type ok")
a=input()
print("and type of your data is",type(x))
print("type ok")
b=input()
print("it is numeric value or not,",x.isnumeric())
print("type ok")
c=input()
print(x.replace("good","pro"))
print("with lower case",x.lower())
print("type ok")
d=input()
print("with uppercase ",x.upper())
print("type ok")
e=input()
print("having no space?...",x.isalnum())

Comments

Popular posts from this blog

Shopping Bill Generator In python.

Should we start preparation for BCA/MCA from class 11th ? How ?

Python program to check that a list have elements in it or not .