1. Python code for Addition/sum of two numbers
a=10
b=12
c=a+b
print(c)
2. Python code for Multiplication/ Product of two numbers
a=10
b=12
c=a*b
print(c)
3. Python code to find the greatest/biggest of 2 numbers.
a=10
b=5
if a>b:
print("A is big")
else:
print("B is big")
4. String functions
Example LOWER( ) STRING Function: to convert upper case string to lower case string
name="KRIDGE"
print(name.lower())
Example UPPER( ) STRING Function: to convert lower case string to upper case string
name="kridge"
print(name.upper())
Example for len( ) function.
name="kridge"
print(len(name))
0 comments:
Post a Comment