摘要: First, complete the following class definition:class BankAccount: def __init__(self, initial_balance): """Creates an account with the give... 阅读全文
posted @ 2014-10-31 13:46 同叔练级之路 阅读(306) 评论(0) 推荐(0)
摘要: pyton 程序内容的颠倒,运用 [](列表)def reverse_string(s): """Returns the reversal of the given string.""" result = "" for char in s: result = char... 阅读全文
posted @ 2014-10-22 20:35 同叔练级之路 阅读(154) 评论(0) 推荐(0)
摘要: import simpleguiimport math# global variablesball_pos = [50,50]ball_radius = 12ball_color = 'red'# help fuctions# classes# define event handlers # ... 阅读全文
posted @ 2014-10-22 14:26 同叔练级之路 阅读(156) 评论(0) 推荐(0)
摘要: Mini-project description — Rock-paper-scissors-lizard-SpockRock-paper-scissors is a hand game that is played by two people. The players count to three... 阅读全文
posted @ 2014-10-18 14:58 同叔练级之路 阅读(363) 评论(0) 推荐(0)
摘要: Mini-project #4 - "Pong"In this project, we will build a version ofPong, one of the first arcade video games (1972). While Pong is not particularly ex... 阅读全文
posted @ 2014-10-18 14:31 同叔练级之路 阅读(572) 评论(0) 推荐(0)
摘要: # Ball motion with an explicit timerimport simplegui# Initialize globalswidth = 600height = 600ball_pos = [width/2, height/2]ball_radius = 20ball_vel ... 阅读全文
posted @ 2014-10-18 10:53 同叔练级之路 阅读(163) 评论(0) 推荐(0)
摘要: # Ball motion with an explicit timerimport simplegui# Initialize globalswidth = 600height = 600ball_pos_init = [width/2, height/2]ball_radius = 20ball... 阅读全文
posted @ 2014-10-18 10:21 同叔练级之路 阅读(135) 评论(0) 推荐(0)
摘要: (1)RANDN产生正态分布数的语法:RANDN(N) :产生N× N的矩阵,其元素是按正态分布的数组;RANDN(M,N) and RANDN([M,N]):产生M×N的矩阵;RANDN(M,N,P,...) or RANDN([M,N,P...])产生随机序列;(2)RANDN产生伪随机数的... 阅读全文
posted @ 2014-04-24 20:51 同叔练级之路 阅读(411) 评论(0) 推荐(0)
摘要: 饭桶么?当你了解你自己是饭桶的时候,你已经走在了通往高手的路上了。对于未来的发展没有仔细想过太多。研究生生活下来快9个月了,收获不少,至少知道自己努力的方向了。但是光有努力方向没有持之以恒的毅力也是不行。关注的学科要点:电力需求侧管理领域的新技术、新方法。工具的学习:C/C++,数据挖掘模型,英语兴... 阅读全文
posted @ 2014-03-25 12:51 同叔练级之路 阅读(94) 评论(0) 推荐(0)
摘要: 学C++的时候,这几个输入函数弄的有点迷糊;这里做个小结,为了自己复习,也希望对后来者能有所帮助,如果有差错的地方还请各位多多指教(本文所有程序均通过VC 6.0运行)1、cin 2、cin.get() 3、cin.getline() 4、getline() 5、gets() 6、getchar()... 阅读全文
posted @ 2014-03-11 21:02 同叔练级之路 阅读(107) 评论(0) 推荐(0)