
作业
SYSUSDCSGJH
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
[leetcode] 11. Container With Most Water
[leetcode] 11. Container With Most Water题目:Given 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 ...原创 2018-04-30 21:12:26 · 206 阅读 · 0 评论 -
[leetcode] 65. Valid Number
[leetcode] 11. Container With Most Water题目:validate if a given string is numeric. Some examples: "0" => true " 0.1 " => true "abc" => false "1 a" => false "2e10" =&am原创 2018-05-02 20:43:38 · 213 阅读 · 0 评论 -
[leetcode][array] 42. Trapping Rain Water
[leetcode]42. Trapping Rain WaterGiven n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.The above...原创 2018-04-28 00:00:30 · 322 阅读 · 0 评论 -
[leetcode] 23. Merge k Sorted Lists
[leetcode] 23. Merge k Sorted ListsMerge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.Example:Input:[ 1->4->5, 1->3->4, 2-...原创 2018-04-28 00:33:04 · 189 阅读 · 0 评论 -
Numpy课后习题
Numpy课后习题Generate matrices A, with random Gaussian entries, B, a Toeplitz matrix,where A ∈Rn×m and B ∈Rm×m, for n = 200, m = 500. 由于n = 200, m = 500过大,难以显示,使用n = 10, m = 15替代1.类的创建和初始化,创建矩阵A、B,...原创 2018-05-22 19:19:13 · 554 阅读 · 0 评论 -
[Matplotlib课后练习]
Exercise 11.1: Plotting a functionPlot the functionf(x) = sin2(x−2)e−x2 over the interval [0,2].Add proper axis labels, a title, etc.import matplotlib.pyplot as pltimport numpy as npx = np.l...原创 2018-05-27 22:57:31 · 290 阅读 · 0 评论 -
[Scipy课后习题]
Scipy课后习题Exercise 10.1: Least squaresGenerate matrix A ∈ Rm×n with m > n. Also generate some vector b ∈ Rm. Now find x = argminxkAx−bk2. Print the norm of the residual.from scipy import ...原创 2018-06-04 21:44:42 · 391 阅读 · 0 评论 -
[高级编程技术] 第十四周
Part1For each of the four datasets…Compute the mean and variance of both x and yCompute the correlation coefficient between x and yCompute the linear regression line: y=β0+β1x+ϵ (hint: u...原创 2018-06-13 13:34:28 · 270 阅读 · 0 评论 -
高级编程技术第六周平时作业
高级编程技术第六周平时作业10-11 喜欢的数字:First program:import jsonfilename = 'number.json'number = input("Input your favorite integer number: ")try: number = int(number)except ValueError: prin...原创 2018-04-10 13:00:41 · 279 阅读 · 0 评论 -
高级编程技术第五周作业
高级编程技术第五周作业9-1 餐馆:class Restaurant(): def __init__(self, restaurant_name, cuisine_type): self.restaurant_name = restaurant_name self.cuisine_type = cuisine_type def descr...原创 2018-04-02 16:56:22 · 232 阅读 · 0 评论 -
高级编程技术第四周平时作业(2)
高级编程技术第四周平时作业(2)8-1 消息:def display_message(): """打印本章学什么""" print("本章学的是函数。")display_message()8-2 喜欢的图书:def favorite_book(title): print("One of my favorite books is " + title)f...原创 2018-04-02 00:36:50 · 214 阅读 · 0 评论 -
高级编程技术第一周平时作业
高级编程技术第一周平时作业1、浏览Python主页(https://www.python.org/)的发现和收获在Python的主页上,一个亮眼的地方在于它有一个模块介绍了某些Python的语法和特点,并附有着代码,在上面可以有个按钮转到Python的Online console进行在线运行Python。 文档:在Python的主页上除了基本的安装程序,上面还附有Python的文...原创 2018-03-07 19:15:21 · 374 阅读 · 0 评论 -
高级编程技术第二周平时作业(2)
高级编程技术第二周平时作业(2)4-1 披萨:pizzas = ['Seafood pizza', 'Sausage pizza', 'Cheese pizza']for pizza in pizzas: print(pizza)for pizza in pizzas: print('I like ' + pizza)4-3 数到20:for i in ra...原创 2018-03-14 19:43:32 · 246 阅读 · 0 评论 -
高级编程技术第一周平时作业(2)
高级编程技术第一周平时作业(2)2-2 多条简单信息:将一条信息存储到变量中,将其打印出来;再将变量的值修改为一条新信息,并将其打印出来。>>> message = “Hello, everyone!”>>> print(message)Hello, everyone!>>> message = “Hi, Tom!”>...原创 2018-03-08 22:14:52 · 544 阅读 · 0 评论 -
高级编程技术第三周平时作业
高级编程技术第三周平时作业5-2 更多条件测试:print('dog' == 'cat')print('dog' == 'dog')print()print('Dog' == 'dog')print('Dog'.lower() == 'dog')print()print(11 == 11)print(11 != 11)print(12 > 11)print(...原创 2018-03-21 21:07:00 · 249 阅读 · 0 评论 -
高级编程技术第三周平时作业(2)
高级编程技术第三周平时作业(2)6-1 人:information = { 'first_name': 'Guo', 'last_name': 'Kiko', 'age': 20, 'city': 'Shandong',}print(information['first_name'] + ' ' + information['last_name'...原创 2018-03-21 21:07:19 · 246 阅读 · 0 评论 -
高级编程技术第五周平时作业(2)
高级编程技术第五周平时作业(2)10-1 Python 学习笔记in learning_python.txt:In Python you can say hello world.In Python you can calculate 1 + 1.In Python you can do everything.in main.py:file_name = 'learning_...原创 2018-04-08 20:03:26 · 211 阅读 · 0 评论 -
高级编程技术第四周平时作业
高级编程技术第四周平时作业7-3 10的整数倍:number = input("输入一个数字:")number = int(number)if number % 10 == 0: print("这是10的整数倍")else: print("这不是10的整数倍")7-5 电影票:msg = "请输入你的年龄,我会告诉你对应的电影票价,或者输入'quiz'退出...原创 2018-04-01 23:51:53 · 278 阅读 · 0 评论 -
sklearn习题
高级编程技术sklearn习题题目: 代码:#!/usr/bin/env python# -*- coding: utf-8 -*- import sklearn.datasets as sdimport sklearn.metrics as smimport sklearn.model_selection as smsimport sklearn.naive_...原创 2018-06-19 19:21:27 · 357 阅读 · 0 评论