Commit ca97e9c8 by BellCodeEditor

save project

parent b832e123
str=["a","b""c","d","a"]
for i in range(1,len(str1)):
print(str[i])
for i in str1:
print(i,end=" ")
import random
age=random.randint(1,10)
print
dict2={"age":10,"age1":20,"age2":30,"age3":40}
dict2 ["age1"]=20
print(dict2)
if "age1" in dict:
print(dict["age1"])
with open("r:\\Users\\Administrator\\Desktop\\test.txt",'r',encoding='utf-8')as file1:
ror data in file1:
if 'xiaoqiang:10ben'in data:
print('数据在文件中')
......
class Hero:
def __init__(self):
self.level=1
self.hp=300
self.attack=20
yase=Hero()
print(yase.hp)
for i in range(3):
print(i)
\ No newline at end of file
import pygame
pygame,init()
from pygame import locals
pygame.init()
screen=pygame.display,set_mode((660,480))
while True:
for event in pygame,event.get():
if event.type == locals.QUIT:
exit()
screen.blit(backgound,(0,0))
screen.blit(right,(290,120))
screen.blit(foog,(360,300))
\ 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