CodeSolved

A comprehensive source of programming questions and exercises

Checking the string letters

Practice Easy 30/ Download 1405 Views

Write a function that receives a string and checks all the letters.

If all the letters of the string were small, otherwise False would return

9 Answers

text = input("please enter a sentence: ")
if text.islower():
    print("True")
else:
    print("False")
def is_all_lowercase(input_string):
    # Checks if all the letters are small
    return input_string.islower()

# Function test
test_string = input("لطفاً یک رشته وارد کنید: ")
result = is_all_lowercase(test_string)

if result:
    print("تمام حروف رشته کوچک هستند: True")
else:
    print("تمام حروف رشته کوچک نیستند: False")
Mma123 Download Python
nam = input("what your:")
    if name[0:] == lower() and name[0:]==isalpha() :
        print("True")
    else:
        print("False")

? 'Namerror: Name' Name 'is not defined. DID You Mean: 'NAM Marzie.salehi


print("enter you carecter")
x = input(str)
if x.islower(): # Examinations. I have used uppercase in the string
    print(True)
else:
    print(False)
Ali.r.h.z Download Python
def string():
    text = input("enter text: ")
    return True if text.islower() and text.isalpha() else False
print(string())
def is_lower(str):
    if str.islower():
        print ('true')
    else:
        print ('false')
str=input('your str : ')
is_lower(str)
User 35 Download Python
def is_all_lowercase(s):
    return s.islower()
string = input('Enter a string : ')
print(is_all_lowercase(string))
User 937 Download Python
text = input("pleas enter the sentence :")
def lower_upper(text):
    if text.islower():
        return True
    elif text.isupper():
        return False
print(lower_upper(text))

Submit answer

Submitting answers is currently unavailable.

Related content

Detection using AI
×
×
Close