原创 Python編程作業【第一週】(一)

1-1 python官網:python.org在第一節課上,老師對python這門語言做了簡要的介紹,讓我這個python的初學者對python有了大致的瞭解,其中python的官網也對我起到了很大的幫助。1、python官網的風格可以說

原创 Python編程作業【第十三週】(scipy homework)

Scipy Exercise 10.1: Least squares import numpy as np from scipy import linalg import matplotlib.pyplot as plt import

原创 Python編程作業【第十四周】(jupyter homework)

Anscombe’s quartet Anscombe’s quartet comprises of four datasets, and is rather famous. Why? You’ll find out in this e

原创 Python編程作業【第八週】(二)

LEETCODE #27 Remove Element Description: Given an array nums and a value val, remove all instances of that value i

原创 Python編程作業【第九周】(一)

#120 Triangle 題目來源 https://leetcode.com/problems/triangle/description/ 題意分析 在一個二維列表當中存儲着一個三角形形狀的數據,當這些數據被看成是三角形形狀時,求出從上

原创 Python編程作業【第三週】(一)

5-1 namescar = 'BMW'print (car == 'BMW')print (car == 'Audi')5-2 greet wordscar1 = 'BMW'car2 = 'Bmw'print (car1 == car2

原创 Python編程作業【第四周】(二)

8-1 messagesdef display_message(): print("nice to learn the method") display_message()8-2 favorite booksdef favorit

原创 Python編程作業【第十一週】(Matplotlib homework)

Matplotlib Exercise Exercise 11.1: Plotting a function import numpy as np import matplotlib.pyplot as plt import math

原创 Python編程作業【第五週】(二)

10-1 Python notesfile_path = "learning_python.txt" with open(file_path) as obj: str1 = obj.read() print(str1) with

原创 Python編程作業【第十五週】(sklearn homework)

Sklearn Create a classification dataset (n samples ≥≥ 1000, n features ≥≥ 10) Split the dataset using 10-fold cross

原创 Python編程作業【第八週】(三)

LEETCODE #53 Maximum Subarray Description: Given an integer array nums, find the contiguous subarray (containing a

原创 Python編程作業【第二週】(一)

3-1 namesnames = ['zhaobinqi', 'zhuzhiru', 'zongjie'] for name in names: print (name)3-2 greet wordsnames = ['zhaob

原创 Python編程作業【第十一週】(Numpy homework)

Numpy Exercise 9.1: Matrix operations import numpy from scipy import linalg n = 200 m = 500 def function(lam, A, B):

原创 Python編程作業【第六週】(一)

10-9 silent cat and dogtry: with open("cats.txt") as obj: for line in obj.readlines(): print(line, end = ''

原创 Python編程作業【第五週】(一)

9-1 restaurantsclass Restaurant(): def __init__(self, restaurant_name, cuisine_type): self.restaurant_name