'''#小作业1.6
#6.定义一个字符串"python的创始人是Guido",试分别打印出"Guido","odiuG", "ph的人uo"
s = 'python的创始人是Guido'
print(s[11::])
print(s[:-6:-1])
a = s[0]
f = s[3]
b =s[6]
c = s[9]
d = s[12]
e = s[15]
print(a+f+b+c+d+e)
'''
'''
#小作业1.7
#7.有字符串"你"和"最帅",如何得到字符串"你最帅",又如何得到字符串"你最帅最帅最帅"
s1 = '你'
s2 = '最帅'
print(s1+s2)
print(s1+s2*3)
'''
'''
#小作业2.2
#2. 像121 11 111等对称的整型数称为回文整型数,随机产生1000以内的10个整型数,> 打印其中的回文整型数
import random
i = 0
while i < 10:
a = random.randint(1,1000)
print(a)
s = str(a)
#print(type(s))
s1 = s[::]
#print(s1)
s2 = s[::-1]
#print(s2)
if s1 == s2:
print('%d是回文数字'%a)
i += 1
'''
'''
#小作业2.4
#4. 公鸡5文钱1只,母鸡3文钱1只,小鸡3只1文钱,用100文钱买100只鸡,可以怎么买
?
gj = 0
mj = 0
xj = 0
for gj in range(1,21):
for mj in range(1,34):
xj = 100 -gj -mj
if(5*gj + 3*mj + xj/3 == 100):
print(gj,mj,xj)
'''
'''
#小作业2.5
#5. 使用input()读入一个字符串,统计字符串中字母的个数,和数字的个数
s = input('请输入一个字符串:')
cnt = 0
digit = 0
for i in s:
if 'a'<= i <= 'z' or 'A' <= i <= 'Z':
cnt += 1
elif '0' <= i <= '9':
digit += 1
else:
pass
print(cnt)
print(digit)