Академический Документы
Профессиональный Документы
Культура Документы
-We can also store a number, while storing number we dont need quotation mark.
phrase="Giraffe Academy"
print(phrase)
-Concatenation- It is basically the process of taking a string and appending
another string onto it
example = print(phrase + "is cool")
-Function - it is basically a little block of code that we can run and it will
perform a specific operation for us. We can use function to
modify our strings, get info about our strings.
print(phrase.lower())- Convert entrie string in lower case
print(phrase.upper())- Convert entire string in upper case
print(phrase.isupper())- to check if a string is entirely upper case or lower, it
will give true or false value.
print(phrase.upper().isupper())- it will first run n change the string in upper
case and den check whether the string is entirely in upper case or lower.
Other functions
abs - absolute value - this gives us the asolute value of number
example- my_num=5
print(abs(my_num))