shaurya_is_codinguh's blog

By shaurya_is_codinguh, history, 6 weeks ago, In English

Hello, I am a beginner coder. I have suspected a bug in the problem 59A :

Your code here...
word=input("")
count1=0
count2=0


for i in word:
      if(i.islower()):
            count1=count1+1
      elif(i.isupper()):
            count2=count2+1

if count1 == count2:
	print(word.lower())

elif word.isupper():
	print(word.upper())

elif count1 <= 1:
	print(word.upper())

elif count1 > 1 and i.islower():
	 print(word.lower())

then it says:

Input

KSXBXWpebh

Output

ksxbxwpebh

Answer

KSXBXWPEBH

Checker Log

wrong answer 1st words differ — expected: 'KSXBXWPEBH', found: 'ksxbxwpebh'

tried it all, also checked the code in a cmd, no issues there but a bug here, I would like this to be fixed so I may submit my code again and get it right.

 
 
 
 
  • Vote: I like it
  • -17
  • Vote: I do not like it

»
6 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Please type the comments on this so I may get back

»
6 weeks ago, # |
  Vote: I like it +8 Vote: I do not like it

There is no bug. Your code is wrong

»
6 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Read the problem statement again and figure out what bs you have done. Your corrected code