随笔分类 - Python
摘要:这是在coursera上面的一门学习pyhton的基础课程,由RICE的四位老师主讲。生动有趣,一共是9周的课程,每一周都会有一个小游戏,经历一遍,对编程会产生很大的兴趣。 所有的程序全部在老师开发的在线平台进行测试,并且还有“VIZ mode”,可以通过可视化的模式,理解程序的进程。This c...
阅读全文
摘要:Question 8We can use loops to simulate natural processes over time. Write a program that calculates the populations of two kinds of “wumpuses” over ...
阅读全文
摘要:Question 7Convert the following English description into code.Initializento be 1000. Initializenumbersto be a list of numbers from 2 to n, but not i...
阅读全文
摘要:First, complete the following class definition:class BankAccount: def __init__(self, initial_balance): """Creates an account with the give...
阅读全文
摘要:pyton 程序内容的颠倒,运用 [](列表)def reverse_string(s): """Returns the reversal of the given string.""" result = "" for char in s: result = char...
阅读全文
摘要:import simpleguiimport math# global variablesball_pos = [50,50]ball_radius = 12ball_color = 'red'# help fuctions# classes# define event handlers # ...
阅读全文
Mini-project # 1 - Rock-paper-scissors-___An Introduction to Interactive Programming in Python"RICE"
摘要: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...
阅读全文
摘要: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...
阅读全文
摘要:# Ball motion with an explicit timerimport simplegui# Initialize globalswidth = 600height = 600ball_pos = [width/2, height/2]ball_radius = 20ball_vel ...
阅读全文
摘要:# Ball motion with an explicit timerimport simplegui# Initialize globalswidth = 600height = 600ball_pos_init = [width/2, height/2]ball_radius = 20ball...
阅读全文

浙公网安备 33010602011771号