def check_2_uppercase_in_first_4(str):
count_uppercase = 0
for ch in str[:4]:
if ch.upper() == ch:
count_uppercase += 1
if count_uppercase == 2:
return True
return False
print(check_2_uppercase_in_first_4('Python'))
print(check_2_uppercase_in_first_4('PytHon'))
print(check_2_uppercase_in_first_4('JaVa Programming'))
'''
run:
False
True
True
'''