#7.23_1
# out = []
# for num in range(1000,3001):
# s=str(num)
# if(int(s[0])%2==0 and int(s[1])%2==0 and int(s[2])%2==0 and int(s[3])%2==0):
# out.append(s)
# print(','.join(out))
#7.23_2
# s=input()
# asum,dsum=0,0
# for x in s:
# if x.isalpha():
# asum+=1
# if x.isdigit():
# dsum+=1
# else:
# pass
# print('LETTER {0}'.format(asum))
# print('DIGIT '+str(dsum))
#7.23_3
# s=input()
# usum=0
# lsum=0
# for x in s:
# if x.isupper():
# usum+=1
# if x.islower():
# lsum+=1
# else:
# pass
# print('UPPER CASE {}\nLOWER CASE {}'.format(usum,lsum))
#7.23_4
# a=input()
# n1=int('%s'%a)
# n2=int('%s%s'%(a,a))
# n3=int('%s%s%s'%(a,a,a))
# n4=int('%s%s%s%s'%(a,a,a,a))
# print(n1+n2+n3+n4)
#7.23_5
# s=input().split(',')
# number=[]
# for n in s:
# if int(n)%2!=0:
# number.append(n)
# print(','.join(number))
#7.23_6
# netAmount=0
# while True:
# s=input()
# values=s.split(' ')
# operation=values[0]
# amount=int(values[1])
# if operation=='D':
# netAmount+=amount
# elif operation=='W':
# netAmount-=amount
# else:
# pass
# print(netAmount)
#7.23_7
# import re
# s=input().split(',')
# value=[]
# for str in s:
# if len(str)>=12 and len(str)<=6:
# continue
# elif not re.search('[a-z]',str):
# continue
# elif not re.search('[A-Z]',str):
# continue
# elif not re.search('[0-9]',str):
# continue
# elif not re.search('[$#@]',str):
# continue
# else :
# pass
# value.append(str)
# print(','.join(value))
#7.23_8
# from operator import itemgetter,attrgetter
# l=[]
# while True:
# s=input()
# if not s:
# break
# l.append(tuple(s.split(',')))
# print(sorted(l,key=itemgetter(0,1,2)))
#7,23_9
# def putNumber(n):
# i=0
# while i<n:
# j=i
# i+=1
# if j%7==0:
# yield j
# for i in putNumber(100):
# print(i)
#7.23_10
# import math
#
# pos=[0,0]
# while True:
# s=input()
# if not s:
# break
# movement=s.split(' ')
# direction=movement[0]
# steps=int(movement[1])
# if direction=='up':
# pos[0]+=steps
# elif direction=='down':
# pos[0]-=steps
# elif direction=='left':
# pos[1]-=steps
# elif direction=='right':
# pos[1]+=steps
# else:
# pass
# print(int(round(math.sqrt(pos[0]**2+pos[1]**2))))
7.23号python新手练习题
最新推荐文章于 2024-09-16 14:49:33 发布