- 博客(22)
- 资源 (1)
- 收藏
- 关注
原创 泡泡堂游戏开发 (Python Project)
BNB AI设计概述 在本次python的项目中,我们小组顺利的完成了游戏泡泡堂的基本功能,总代码量接近5k行,并在游戏泡泡堂的基本功能上实现了创新和拓展。选择泡泡堂作为python课程的项目题目是因为泡泡堂这一游戏,本身被多数玩家青睐,自2003年泡泡堂创建至今,泡泡堂就一直流行于中国甚至世界。因此,在学习了python基础之后,我们小组选择实现泡泡堂这个游戏,在实现过程中能帮助我们更好地...
2018-07-24 09:57:08
7156
5
原创 Scikit-Learn
Scikit-LearnScikit-Learn Assignment Assignmentfrom sklearn import datasetsfrom sklearn import cross_validationfrom sklearn.naive_bayes import GaussianNBfrom sklearn.svm import SVCfrom skl...
2018-06-14 08:53:38
641
原创 Pandas and Statsmodels
Pandas and Statsmodels Exercises Part 1import pandas as pdimport numpy as npimport statsmodels.api as smdf = pd.read_csv("anscombe.csv")print ("The mean")print (df.groupby("dataset")["...
2018-06-08 19:04:00
976
原创 Scipy
Scipy Exercises Exercise 10.1: Least squaresimport numpy as npimport scipy.optimize as optm = 10n = 5num = 20A = np.random.randint(-num, num, size = m * n).reshape(m, n)b = np.random....
2018-05-30 23:29:38
734
原创 Matplotlib
Matplotlib ExercisesExercise 11.1: Plotting a functionimport matplotlib.pyplot as pltimport numpy as npdef f(x): """Compute f(x)""" part1 = np.sin(x - 2) p
2018-05-25 20:24:43
666
原创 Numpy
Numpy ExercisesExercise 9.1: Matrix operationsimport numpy as npfrom scipy.linalg import toeplitzimport randomn = 200m = 500def MyPrint(ans): print (ans) print ("")def Calculate...
2018-05-17 18:48:11
521
原创 LeetCode 50
LeetCode 50. Pow(x, n)Implement pow(x, n), which calculates x raised to the power n (x^n).Example 1:Input: 2.00000, 10Output: 1024.00000Example 2:Input: 2.10000, 3Output: 9.26100Exam...
2018-05-02 19:37:47
609
原创 LeetCode 93
LeetCode 93. Restore IP AddressesGiven a string containing only digits, restore it by returning all possible valid IP address combinations.Example:Input: "25525511135"Output: ["255.255.11.135",...
2018-04-28 13:43:46
862
原创 LeetCode 39
LeetCode 39. Combination SumGiven a set of candidate numbers (candidates) (without duplicates) and a target number (target), find all unique combinations in candidates where the candidate numbers su...
2018-04-27 22:23:03
1845
原创 LeetCode 11
LeetCode 11. Container With Most WaterGiven n non-negative integers a1, a2, …, an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line...
2018-04-25 19:15:50
505
原创 高级编程技术第十一次作业
第十一章 测试代码11-1 城市和国家import unittestdef func(city, country): return city + ", " + countryclass FunctionTest(unittest.TestCase): def test_city_country(self): fomatted = func("san...
2018-04-09 08:52:51
651
原创 高级编程技术第十次作业
第十章 文件和异常10-1 Python学习笔记with open("hw.txt") as file_object: contents = file_object.read() print (contents)with open("hw.txt") as file_object: for line in file_object.readlines(): ...
2018-04-04 20:39:23
381
原创 高级编程技术第九次作业
第九章 类9-1 餐馆class Restaurant(): def __init__(self): self.restaurant_name = "GoGo" self.cuisine_type = "Spicy" def describe_restaurant(self): print (self.restaurant...
2018-04-02 23:06:15
387
原创 高级编程技术第八次作业
第八章 函数8-1 消息def display_message(): print ("This chapter we will learn functions")display_message()8-2 喜欢的图书def favorite_book(title): print ("One of my favorite books is " + title...
2018-03-28 23:07:43
437
原创 高级编程技术第七次作业
第七章 用户输入和while循环7-1 汽车租赁car = input("Which car do you want to buy?")print ("Let me see if I can fond you a " + car)7-2 餐馆定位number = input("How many people will have the meal? ")number = int(...
2018-03-27 23:37:10
249
原创 高级编程技术第六次作业
第六章 字典6-1 人personal_information = { "first_name": "David", "last_name": "Blade", "age": 20, "city": "NewYork"}print (personal_information)6-2 喜欢的数字favourite_num
2018-03-21 23:19:19
248
原创 高级编程技术第五次作业
第五章 if语句5-1 条件测试name = "Peter"print ("Is name == Peter? ")print (name == "Peter")5-2 更多的测试条件name1 = "Peter"name2 = "Bob"print ("Is name1 == Peter and name2 == Bob? ")print (name1 == &
2018-03-19 12:59:17
480
原创 高级编程技术第四次作业
第四章 操作列表4-1 比萨pizzas = ["Apizza", "Bpizza", "Cpizza"]for pizza in pizzas: print ("I like " + pizza)print ("I really like pizza! ")4-2 动物Animals = ["Dog", "Cat", "Fish&
2018-03-15 09:22:20
391
原创 高级编程技术第三次作业
第三章 列表简介3-1 姓名names = ["Ace", "Bob", "Cindy"]print (names[0])print (names[1])print (names[2])3-2 问候语names = ["Ace", "Bob", "Cindy"]print (names[0] + " Nice to meet you")
2018-03-12 12:40:54
508
原创 浏览python主页有感以及精通python后的目标
浏览python主页有感首先介绍一下python Python, 是一种面向对象的解释型计算机程序设计语言,由荷兰人Guido van Rossum于1989年发明,第一个公开发行版发行于1991年。 Python是纯粹的自由软件, 源代码和解释器CPython遵循 GPL(GNU General Public License)协议。Python语法简洁清晰,特色之一是强制...
2018-03-11 10:53:46
346
原创 高级编程技术第二次作业
第二章 变量和简单数据类型2-1 简单消息message = "Hello python"print (message)2-2 多条简单消息message = "Hello python"print (message)message = "new Hello python"print (message)2-3 个性化消息name = "Peter"pri...
2018-03-07 21:47:32
301
原创 Hello CSDN
Hello CSDN#include <iostream>using namespace std;int main(){ cout << "Hello CSDN" << endl;}
2018-03-05 19:03:07
415
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人