JavaScript
JavaScript is a programming language that grew out of a need to add interactivity to web sites within the browser. It has since evolved into an incredibly versatile language that is used for both client-side (within the browser) and server-side (code that serves web pages to users) applications.
-
Codecademy
2019-10-06 01:09:08Codecademy JavaScript | CodecademyCodecademy Courses Creators Jobs Sign In Create Account JavaScriptJavaScript is a prog...转载于:https://www.cnblogs.com/lexus/archive/2012/03/03/2378755.html
-
codecademy
2013-04-30 14:09:22一个编程教学网站,内容包括...感觉不错就拿这个来走python了,互动coding刷课比常规看书有主动些也有精神些 http://www.codecademy.com/#!/exercises/0 String部分: len(), str(), upper(), lower()四个方法,其中lcodecademy界面风格感觉不错,就拿这个来走python基础了
入门部分很简单,顺手记tips
-
codecademy python study
2018-10-27 22:54:45https://www.codecademy.com/learn 好像是之前,了解bash脚本的时候,感觉这个网站还不错哦!将Python学习了一下,主要是了解一下语法!其实我平时也是不用的!毕竟是Java开发的程序,虽然说,大学的时候有些课程了解...https://www.codecademy.com/learn 好像是之前,了解bash脚本的时候,感觉这个网站还不错哦!将Python学习了一下,主要是了解一下语法!其实我平时也是不用的!毕竟是Java开发的程序,虽然说,大学的时候有些课程了解过一些Python的语法,不过时间这个东西很难说,很久不适用慢慢的就忘记了…所以还是得没事的时候学一下,免得别人都说我在debug哈哈哈…,或者来一句头发都要掉光了…这些鸽子就是喜欢开玩笑。其实py也是一种脚本语言,在很多的途径都是有使用的!可能是自己接触的范围比较少吧,学历这个东西不足,了解的范围还是比较少。
如下是我学习的记录:
学习Python
- https://www.codecademy.com/learn 这个网站跟着敲确实不错!能够记住一些东西,反复的提醒你!多多少少的还是学到一些东西。
- http://www.runoob.com/python/python-tutorial.html 菜鸟教程不可少,python2,python3都有,对于我们这种随便玩玩的同志,无所谓啦!
- IDEA工具准备好~PyCharm 提示功能鉴权,对于一个习惯了IDEA开发工具的程序员来说,这个工具对于学习Python简单了不少。
- github 是个好东西!没事自己瞎玩玩!
Note:Java程序估计是忍受不了没有;,没有{}…,没有类型的区别,有点类似Js的感觉,不过这个看起来确实非常的简洁,很多功能使用起来还是十分的方便的!
codecademy 的一些记录
- 输入参数
name = raw_input("What is your name")
- 读取时间
from datetime import datetime print datetime.now()
- 打印查看当前导入的类的一些信息
import math print dir(math) ['__doc__', '__file__', '__name__', '__package__', 'acos', 'acosh', 'asin', 'asi nh', 'atan', 'atan2', 'atanh', 'ceil', 'copysign', 'cos', 'cosh', 'degrees', 'e', 'erf', 'erfc', 'exp', 'expm1', 'fabs', 'factorial', 'floor', 'fmod', 'frexp', 'fsum', 'gamma', 'hypot', 'isinf', 'isnan', 'ldexp', 'lgamma', 'log', 'log10', 'log1p', 'modf', 'pi', 'pow', 'radians', 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'trunc']
- 定义了函数,定了类没有实现 pass
def print_dic(dic): pass class NewClass(object): pass
- List 添加删除、遍历
n = [1, 3, 5] #def remove(self, value): # real signature unknown; restored from __doc__ # """ # L.remove(value) -- remove first occurrence of value. # Raises ValueError if the value is not present. # """ # 删除数据中存在的元素 print n.remove(1) #打印日志为 NONE ##删除指定的index下标的元素 print n.pop(1) #打印日志为5 n.append(6) def print_list(array): if type(array) == list: for item in array: print item else: print "type is error" def print_list2(array): if type(array) == list: for item in range(len(array)): print array[item] else: print "type is error" if __name__ == '__main__': print_list([1, 2, 3]) print_list2([4, 5, 6]) 1 2 3 4 5 6
- 类似Map 的dic ,数据字典
def print_dic(dic): if type(dic) == dict: print dic.items() print dic.values() print dic.keys() for dic_item in dic: print dic[dic_item] if __name__ == '__main__': print_dic({"name": "wangji", "hight": "168cm"}) [('name', 'wangji'), ('hight', '168cm')] ['wangji', '168cm'] ['name', 'hight'] wangji 168cm
- 数组设置默认值
array = [0] * 5 print array #[0, 0, 0, 0, 0]
- join操作符,类似将一个数组然后使用使用
letters = ['a', 'b', 'c', 'd'] print "***".join(letters) ##a***b***c***d
- while/else, for/else
只要循环正常退出(没有碰到break什么的),else就会被执行。 - for循序中使用index ,enumerate可以帮我们为被循环对象创建index
def print_list_index(array): if type(array) == list: for index, item in enumerate(array): print index,item else: print "type is error" print_list_index(['a', 'b', 'c', 'd']) 0 a 1 b 2 c 3 d
- 逗号的使用
def douhao_example(): a, b, c = 1, 2, "汪吉" print a, b, c stirng = "d,e,f" d, e, f = stirng.split(",") print d, e, f # print a + "" + b + "" + c # error print a + "" + b + "" + c # TypeError: unsupported operand type(s) for +: 'int' and 'str' 1 2 汪吉 d e f print a, b 优于 print a + " " + b,因为后者使用了字符串连接符,可能会碰到类型不匹配的问题。
- List 分片,反转,步长
array = [1, 2, 3, 4, 5] print array[0:1: 2] print array[::-2] ##反转,开始,结束,步长 print array[::-1] [1] [5, 3, 1] [5, 4, 3, 2, 1]
- lambda 表达式,感觉和c++的差别不大,这里的filter 还有其他的一些map、reduce等等,教程中没得…
print filter(lambda x: x % 3 == 0, range(0, 100)) #[0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, 51, 54, 57, 60, 63, 66, 69, 72, 75, 78, 81, 84, 87, 90, 93, 96, 99] 0b1010
- 二进制的操作
print 0b111 #7, 用二进制表示10进制数 bin()函数,返回二进制数的string形式;类似的,oct(),hex()分别返回八进制和十六进制数的string。 int("111",2),返回2进制111的10进制数。
- 类的定义,类的方法都要添加self这个!有点类似指针的感觉
可以在子类里直接定义和父类同名的方法
子类调用父类方法可以使用 super(子类,self).父类的方法
class Children(Parent1,Parent)这样的语法糖
继承连接
class Fruit(object): """A class that makes various tasty fruits.""" def __init__(self, name="wangji", color="wangji", flavor="wangji", poisonous="wangji"): self.name = name self.color = color self.flavor = flavor self.poisonous = poisonous def description(self): print "I'm a %s %s and I taste %s." % (self.color, self.name, self.flavor) def is_edible(self): if not self.poisonous: print "Yep! I'm edible." else: print "Don't eat me! I am super poisonous." lemon = Fruit("lemon", "yellow", "sour") lemon.description() lemon.is_edible() wangji = Fruit() wangji.description()
总结
在忙也要学习,补充一下能量,无论是什么都行,别闲着就好了…
-
Plug Codecademy on Get Involved
2020-11-26 10:08:48Maybe we should also link to Codecademy and let people know that there is an awesome and free way for them to gain these skills if they don't already have them. <p></p> <p>Want to back this ... -
codecademy 代码学习1
2016-04-20 17:08:59codecademy python 学习11. Write a function called
censor
that takes two strings,text
andword
, as input. It should return thetext
with theword
you chose replaced with asterisks. For example: censor("this hack is wack hack", "hack") should return "this **** is wack ****"Assume your input strings won't contain punctuation or upper case letters.
The number of asterisks you put should correspond to the number of letters in the censored word.
code:
def censor(text,word):
new_lst=[]
for w in text.split():
print (w)
if w==word:
new_lst.append('*'*len(word))
else:
new_lst.append(w)
return(' '.join(new_lst))
2. Define a function called
count
that has two arguments calledsequence
anditem
. Return the number of times the item occurs in the list.For example:
count([1,2,1,1], 1)
should return3
(because1
appears 3 times in the list).code:
def count(sequence,item):
count=0
for i in sequence:
if i==item:
count=count+1
return count
3. Define a function called
purify
that takes in a list of numbers, removes all odd numbers in the list, andreturn
s the result.For example,
purify([1,2,3])
should return[2]
.code:
def purify(nums):
new_list=[]
for i in nums:
if i%2==0:
new_list.append(i)
return new_list
Write a functionremove_duplicates
that takes in a list and removes elements of the list that are the same.
For example:remove_duplicates([1,1,2,2])
should return[1,2]
.code:
import copy def remove_duplicates(lis): new_list=copy.deepcopy(lis) res=[] for li in new_list: if li not in res: res.append(li) return res remove_duplicates([4,5,5,4])
5.median let's write a function to find the median of a list.The median is the middle number in a sorted sequence of numbers.
code:
def median(ls): new_ls=sorted(ls) if len(ls)%2==1: median=sorted(ls)[(len(ls)-1)/2] else: median=(new_ls[(len(ls)-2)/2]+new_ls[len(ls)/2])/2.0 return median median([4,5,5,4])
-
python codecademy 学习2
2016-04-21 13:44:53python codecademy The Variance -
New JavaScript course on Codecademy?
2020-12-02 01:38:51<p>Hi there, this version of the JavaScript course is being taken down in Summer 2017; we recommend you try our new Learn JavaScript course....ummahusla/Codecademy-Exercise-Answers</p></div> -
Replace 3 Codecademy Pro links with something free
2020-12-31 07:37:13- [ ] https://www.codecademy.com/courses/asynchronous-javascript/lessons/promises/exercises/understanding-promises in curriculum/javascript/javascript-9.md - [ ] ... -
Codecademy.com学习Python
2019-10-02 14:08:16第一步Codecademy网站的Python学习课程。(共15小时,预计一周(6.22-6.27)完成,6.28做总结) Codecademy界面很清爽,语言为英文,正好适合适应英文学习环境,作为入门是不错的选择。 不知道下面的MIT、Harvard的... -
Codecademy网站安利 及 javaScript学习
2019-09-29 10:19:11今天发现一个Code教学网站,号称可以利用零碎时间来学习些代码。 codecademy (https://www.codecademy.com) 转载于:https://www.cnblogs.com/Phantom01/p/5523854.html -
Codecademy 你值得拥有,非常棒的编程学习网站
2018-07-05 08:12:55【回复“1024”,送你一个特别推送】 Codecademy 它是一个免费有趣的在线互动编程学习网站,目前提供了 HTML/CSS/PHP/Javascript/Ruby... -
codecademy SQL 编程系列一Introduction
2017-10-30 16:05:26codecademy SQL 编程系列一Introduction 英文官方网址:https://www.codecademy.com/ 本系列博客仅供学习交流,如要错误,忘不吝赐教!推荐中英文一起学习,转载请注明出处。 一 .learn MANIPULATION 1. ... -
学习编程 | Codecademy
2013-10-30 15:43:00http://www.codecademy.com/learn/ http://wenku.baidu.com/link?url=MVzCUZU29hXLis97LPwmA7S6bzY8UbRjmDNTJokg414gDpqI8-eYTJTdvYtyX-UIcER1sW9C4DcYcWJKZTA4d2484mdTB3iIkHkg1gXbayy 我个人的经验:1.写... -
线上编程学院codecademy
2013-07-09 10:14:41http://www.codecademy.com Tracks are series of courses grouped to help you master a topic or language. Choose one to start learning! 目前网路上有很多学习的资源,程序类的更是如此. 国外知名... -
codecademy 命令行手册(中英文)
2018-03-05 17:18:56codecademy 命令行手册 BACKGROUND The command line is a text interface for your computer. It’s a program that takes in commands, which it passes on to the computer’s operating system to run. ... -
Codecademy这个网站用到什么技术?
2015-10-26 01:47:55网址 https://www.codecademy.com/ 是一个在线的交互式教程网站,用户把代码写好,在线运行,得到结果。 这个网站用到了什么技术或者什么框架,主要是运行代码那一块 -
Codecademy HTML Basics II Font size
2014-03-21 17:05:47Codecademy HTML Basics II Font size 这个是codecademay提供的学员论坛 链接:http://www.codecademy.com/zh/forum_questions/515330ecbefb3fca0f0016a1 在 HTML Basics II > Styling the font!这一节... -
codecademy SQL 编程系列二 Relation Databases && Statements
2017-10-30 16:50:17codecademy SQL 编程系列二Relation Databases && Statements 英文官方网址:https://www.codecademy.com/ 本系列博客仅供学习交流,如要错误,忘不吝赐教!推荐中英文一起学习,转载请注明出处。 一. 关系型... -
Codecademy python
2015-02-13 18:59:00#1 print "Welcome to Python!" #2 my_variable = 10 #3 # Set the variables to the values listed in the instructions! my_int = 7 my_float = 1.23 my_bool = True ...# my_int is set ... -
codecademy.com之JavaScript学习
2014-02-15 15:22:08如何学习javascritpt ... javascript学习站点 http://www.codecademy.com/zh/tracks/javascript Data Structures Arrays Objects 创建对象两种方式 (1)obj -
codecademy SQL 编程系列三Create && Insert , Select
2017-10-30 20:48:28codecademy SQL 编程系列三Create && Insert,Select 英文官方网址:https://www.codecademy.com/ 本系列博客仅供学习交流,如要错误,忘不吝赐教!推荐中英文一起学习,转载请注明出处。 一... -
在codecademy上学习Python
2012-10-07 21:25:532012年10月7日 ...互动式编程网站:www.codecademy.com 做了前面2.5个单元,题目都比较简单,比较适合零基础的初学者,比只看书效果要好,但是题目肯定无法包罗所有知识点的,详细了解还需看其他资料。 -
codecademy练习记录--Learn Python(70%)
2018-05-18 11:29:00############################################################################### codecademy python 5.5# Define a function factorial that takes an integer x as input.# Calculate and return the factorial... -
codecademy SQL 编程系列四Update, Alter,Delete,Constrains,Generalizations
2017-10-30 22:14:24codecademy SQL 编程系列四Update, Alter,Delete,Constrains,Generalizations 英文官方网址:https://www.codecademy.com/ 本系列博客仅供学习交流,如要错误,忘不吝赐教!推荐中英文一起学习,转载请注明出处。...
收藏数
628
精华内容
251
-
基于bs的企业考勤管理系统
-
Linux与数据库基础
-
基于solidworks中的stewart平台建模
-
ManTraNet-Demo.ipynb
-
Java基础知识加进阶知识
-
SubstancePainter插件开发-基础入门
-
text-overflow.html
-
Flutter随手记:Android Studio的设备列表一直在Loading?
-
subplot_std.m
-
Python入门到项目直通车
-
基于ELman神经网络的税收预测模型-统计与决策
-
Xdebug helper.zip
-
云计算基础-Linux系统管理员
-
转行做IT-第7章 数组
-
仿Spy++ 将DLL代码注入EXE的三种方法.zip
-
Notes.docx
-
Java基础内部类.xmind文件
-
电商设计专业思维
-
Betterwmf CAD 2 Word .rar
-
基于51单片机的智能计算器.zip