七月在线课程的练习题
for x in range(1,101):
if x%3==0 and x%5==0:
print(x)
else:
pass
str=input()
if len(str)>=3:
if str.endswith("ing"):
str+="ly"
else:
str+="ing"
else:
pass
print(str)
str=input()
if str==str[::-1]:
print("True")
else:
print("Flase")
# str=input()
str='Study is not only to learn, actually i think this is a bad way. '
if str.index("bad")>str.index("not"):
str=str[0:str.index("not")]+" good "+str[str.index("bad"):]
print(str)
else:
pass
s=input()
splitpoint=len(s)//2
if len(s)%2==0:
s1=s[0:splitpoint]
s2=s[splitpoint:]
else:
s1=s[0:splitpoint+1]
s2=s[splitpoint+1:]
print(s1,'--',s2)
s=input()
firstletter=s[0]
s=s.replace(firstletter,'*')
s=firstletter+s[1:]
print(s)
s=input()
if len(s)>2:
s1=s[0:2]+s[-2:]
else:
s1=''
print(s1)
a=input()
b=input()
if len(a)>2 and len(b)>2:
a,b=b[0:2]+a[2:],a[0:2]+b[2:]
print(a+' '+b)
else:
print('the input string is too short')
height=100
total=0
i=1
while True:
height*=0.5
i+=1
if i>6:break
print('while loop:',height)
height=100
i=1
for i in range(1,7):
height*=0.5
if i<6:
continue
else:
print('for loop:',height)
a=int(input())#小
b=int(input())#大
for i in range(a,b+1):
for j in range(2,i+1):
if i%j==0 and j<i:
print(i,'非素数')
break
elif j==i:
print(i,"素数")