Q5.Select all inputs for which this code will print the value `True` to the console. The input will only contain letters.
```
word = input()
x = 0
y = 0
for char in word:
# z is in lower case in the if-block given below
if 'a' <= char <= 'z':
x += 1
# Z is in upper case in the if-block given below
if 'A' <= char <= 'Z':
y += 1
if x > y:
print(True)
else:
print(False)
```
Save
Check
Details
Q5
23 Feb 2025
Q5.Select all inputs for which this code will print the value `True` to the console. The input will only contain letters.
```
word = input()
x = 0
y = 0
for char in word:
# z is in lower case in the if-block given below
if 'a' <= char <= 'z':
x += 1
# Z is in upper case in the if-block given below
if 'A' <= char <= 'Z':
y += 1
if x > y:
print(True)
else:
print(False)
```