![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
CS入门
小蔡姬不想当咸鱼
这个作者很懒,什么都没留下…
展开
-
CS入门学习笔记14-MIT 6.00.1x- Lecture 12 Object Oriented Programming (Class & Generator
Lectrue 121. Inheritanceinheritance 指的是不仅要建立class,还要在一个class中建立许多的subclass,让它们都可以共享主class中的standard1.1 Using inheritanceLet’s build an application that organizes info about people!– Person: name...原创 2019-10-25 15:06:21 · 273 阅读 · 0 评论 -
CS入门学习笔记13-MIT 6.00.1x- Lecture 11 Classes
Lectrue 111. Class 由来1.1 Objects先前学过的int,float,string,list,dictionary都是一种type,他们中包含的各种具体内容都是一个object。object包括:· A type (a particular object is said to be an instance of the type),不同的type控制对象不同的b...原创 2019-10-17 08:36:37 · 370 阅读 · 0 评论 -
CS入门学习笔记12-MIT 6.00.1x- Lecture 10
Lectrue 101. Search algorithms 搜索算法定义- 用于在特定collection中寻找一个或一组符合特点的值。原创 2019-10-12 03:22:44 · 181 阅读 · 0 评论 -
CS入门学习笔记10-作业题(含generator生成器, yield, input与raw_input区别等初步学习)
1. Finding longest substring in alphabetical orderAssume s is a string of lower case characters.Write a program that prints the longest substring of s in which the letters occur in alphabetical orde...原创 2019-07-11 14:37:33 · 334 阅读 · 0 评论 -
CS入门学习笔记11-MIT 6.00.1x- Lecture 9
Lecture 9 Efficiency and orders of growth他人笔记参考:https://www.cnblogs.com/HuZihu/p/7614460.htmlGoals in designing programsIt returns the correct answer on all illegal inputs;It performs the computa...原创 2019-07-15 17:58:27 · 278 阅读 · 0 评论 -
CS入门学习笔记5-MIT 6.00.1x
MIT 6.00.1x 第五讲-递归Recursion** iterative algorithms-- 迭代算法作业一Write an iterative function iterPower(base, exp) that calculates the exponential baseexp by simply using successive multiplication. For e...原创 2019-07-04 16:11:01 · 451 阅读 · 0 评论 -
CS入门学习笔记9-MIT 6.00.1x
Lecture 8 Assertions and Exceptions1. what is exception----exceptions to what was expectedpython中带有的提示error的方式为:raise an exceptionraise Exception(“descriptive string”)2. python’s handlers for exc...原创 2019-07-09 16:25:21 · 199 阅读 · 0 评论 -
CS入门学习笔记8-MIT 6.00.1x
Lecture 7 DebuggingTesting methods: ways of trying code on examples to determine if running correctlyDebugging methods: ways of fixing a program that you know does not work as intended1. when sho...原创 2019-07-09 12:05:38 · 301 阅读 · 0 评论 -
CS入门学习笔记7-作业题-MIT 6.00.1x
第三周 problem set 3Radiation ExposureIn this problem, you are asked to find the amount of radiation a person is exposed to during some period of time by completing the following function:To complete ...原创 2019-07-08 17:40:43 · 288 阅读 · 0 评论 -
CS入门学习笔记2-MIT 6.00.1x
MIT 6.00.1x 第四讲-函数函数的基本形式使用def作为定义的关键词def max(x, y): if x > y: return x else: return y返回的值为语句中return后的内容或noneenvironment的概念与函数的关系函数属于一个procedure object,即使在全局环境E1中已...原创 2019-06-24 16:39:22 · 258 阅读 · 0 评论 -
CS入门学习笔记6-MIT 6.00.1x-tuple,list,dictionary
Lecture 6 对象截止目前,已学习过的算法:Exhaustive enumerationGuess and checkBisectionDivide and conquer学习过的simple data types:NumbersStrings马上要接触到的Compound data typesTuplesListsDictionaries1. Tupl...原创 2019-07-07 20:57:03 · 422 阅读 · 0 评论 -
CS入门学习笔记3-廖雪峰python教程-函数
第4节-函数函数体内部的语句在执行时,一旦执行到return时,函数就执行完毕,并将结果返回函数的定义与调用pass语句pass可以用来作为占位符,比如现在还没想好怎么写函数的代码,就可以先放一个pass,让代码能运行起来,不会产生报错。如:if age >= 18: pass对函数进行参数检查设置如下即是对my_abs这个函数的参数类型做检查,只允许整...原创 2019-06-26 17:39:11 · 278 阅读 · 0 评论 -
CS入门学习笔记4-MIT 6.00.1x
Week 2 Problem Set1. Assume s is a string of lower case characters.Write a program that counts up the number of vowels contained in the string s. Valid vowels are: ‘a’, ‘e’, ‘i’, ‘o’, and ‘u’. For ...原创 2019-06-26 16:12:01 · 426 阅读 · 0 评论 -
CS入门-系统学习-计划
CS入门-系统学习-计划任务一:完成 MIT 6.00.1x任务二:完成 Harvard CS50x任务三:完成 廖雪峰-Python 教程参考博主 wxw060709 的计划及版式:原文链接:https://blog.csdn.net/wxw060709/article/details/83445924任务一:完成 MIT 6.00.1x序号任务名称视频观看博客总结完成...原创 2019-06-07 17:08:18 · 830 阅读 · 0 评论 -
CS入门学习笔记1-MIT 6.00.1x
MIT 6.00.1x 第三讲ProblemSet:In this problem, you’ll create a program that guesses a secret number!x = int( raw_input('Enter an integer between 0 and 100:'))numGuesses = 0low = 0high = 100ans = (hi...原创 2019-06-07 17:56:16 · 255 阅读 · 0 评论