These are my solutions, YMMV
string = input()
upper = lower = 0
for i in string:
if(i.isupper()):
upper += 1
elif(i.islower()):
lower += 1
print('Upper: {}{}Lower: {}'.format(upper,'\n',lower))
num_list = []
for x in range(1000, 3001):
i = str(x)
if (int(i[0])%2==0) and (int(i[1])%2==0) and (int(i[2])%2==0) and (int(i[3])%2==0):
num_list.append(int(i))
else:
pass
print(num_list)
ip = input()
ip = ip.split(',')
op = []
for i in ip:
if int(i,2)%5 == 0:
op.append(int(i))
else:
pass
print(op)
import math
pos = [0,0]
while True:
ip = input()
if ip == 'END':
break
direction, step = ip.split(' ')
step = int(step)
if direction == 'UP':
pos[1] += step
elif direction == 'DOWN':
pos[1] -= step
elif direction == 'LEFT':
pos[0] -= step
elif direction == 'RIGHT':
pos[0] += step
print(round(math.sqrt(pos[1]**2 + pos[0]**2)))
Comment any doubt.