Commit b082d6bd by BellCodeEditor

auto save

parent e005c52d
Showing with 36 additions and 0 deletions
#第1题
# text = "hello world!"
# for i in text:
# print(i)
#第2题
# str1 = "bellcode"
# print(str1[4:])
#第3题
# text = ['p','y','t','h','o','n']
# print("".join(text))
#第4题
# str1 = "本节课我们学习文字加密"
# str2 = "用python进行"
# list1 = list(str1)
# list1.insert(7,str2)
# print("".join(list1))
#第5题
import random
int1 = 0
int2 = 0
int3 = 0
for i in range(3000):
x = random.randint(8,10)
if x == 8:
int1+=1
elif x == 9:
int2+=1
else :
int3+=1
print(int1,int2,int3)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment