自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(11)
  • 收藏
  • 关注

原创 第一个程序

这是我的第一个程序import randomsecret = random.randint(1, 100)guess = 0tries = 0print "AHOY!  I'm the Dread pirate Roberts, and I have a secret!"print "It is a number from 1 to 99. I'll giv

2016-12-11 17:41:04 427 2

原创 迭代

for i in "jhcjdj": print (i)s = "eiokod"it = iter (s)while True: try: each = next(it) except StopIteration: break print(each)

2017-09-17 12:39:53 253

转载 转换温度

print "This program converts Fahrenheit to Celsius"print "Type in a temperature in Fahrenheit: ",fahrenheit = float(raw_input())celsius = (fahrenheit - 32) * 5.0 / 9print "That is",print celsius,

2017-05-13 19:16:33 312

原创

class cuiyunhao(object): "kfdjdkfokckllddl" cuiyunhao = 9 def chi(self): print "wo ai chi"class pangping(object): laimo = 19 def lai(): print "wo jiu lai mo,za di

2017-05-13 18:27:31 280

原创 sprite类

import pygameclass myballclass(pygame.sprite.Sprite): def __init__(self, image_file, location): pygame.sprite.Sprite.__init__(self) self.inage = pygame.image.load(image_file)

2017-03-05 15:38:48 844

原创 艺术

import pygame, sys, randompygame.init()screen = pygame.display.set_mode([640, 480])screen.fill([255,255,255])for i in range (100): width = random.randint(0, 250) height = random.randint(0,

2017-02-14 17:55:45 263 1

原创 画圆

import pygame, syspygame.init()screen = pygame.display.set_mode([640, 480])screen.fill([255,255,255])pygame.draw.circle(screen, [200,15,0],[100,100], 30, 0)pygame.display.flip()while True: f

2017-02-12 18:53:30 297

原创 ball

class Ball: def bounce(self): if self.direction == "down": self.direction = "up"myBall = Ball()myBall.direction = "down"myBall.color = "small"myBall.size = "small"prin...

2017-02-08 16:57:00 273

原创 新程序

import easyguikey = 15guess = 0tries = 0easygui.msgbox("""1+2+3+4+5=?""")while guess != key and tries < 3: guess = easygui.integerbox("what") if not guess: break elif guess !

2017-02-08 14:10:42 386 1

原创 修改的程序

这是我对第一个程序的修改import random, easyguisecret = random.randint (1, 30)guess = 0tries =0easygui.msgbox("""AHOY! I'm the Dread pirate Roberts, and I hawe a secret!it is a number from 1 to 3

2017-01-09 13:19:41 385 1

原创 今天我得到了一台计算机

我非常高兴 但是 我得跟《跟孩子一起学编程》学编程,这本书还没有但电脑里来所以我还不能学编程看完之后我就能编程了。

2016-12-10 20:34:11 324 1

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除