jack0he的个人博客

何代杰
访问数:25270
教育情况:Delft University of Technology,其它,博士
研究领域:工程材料->机械工程->机械动力学
加为好友
发送消息

全部博文

Python-Note-8-data structure-lists (continue)

Using for loops with lists Example-1 animal= for i in animal: print('The animal is '+i) --- outPut The animal is cat The animal is dog The animal is fish The animal is elephant Is a specific value in a list? 'cat' in animal outP ...
2017-4-12 04:58

Python-note-7-data structure-lists

Data structures: 1, numbers 2, strings, 3, lists, 4, tuples, 5, dictionaries This part concerns the list data type. A list is a vector contains multiple values, including numbers, strings and/or lists. Differing from Matlab in which the elements are bracketed by (), Python brackets the ...
2017-4-12 02:21

Python-Note-6-Global and local variables

a global variable is always defined in the main function while a local one is defined in a non-main function. A global variable can be used in either the main function or the non-main function. However, the local variable can only be used in the defined function and can not be used in ...
2017-4-11 17:56

Python -Note-5-for-statements

for: iterate a clause over the items of any sequence. The sequence can be a set of numbers or strings. Example-1 words= for w in words: print('Hello, '+w) --- outPut: Hello, cat Hello, mice Hello, rabbit Example-2 for i in range ...
2017-4-11 03:55

Python-Note-4-Continue-statements

Continue statements If the continue function is executed, go back to the start of the clause of the while loop. Example: while True: print('please type your name') name=input() if name!='Jack': contin ...
2017-4-11 01:59

Python-Note-3-break-while-loop

break statements Function: break while loop. If the break statement is executed, the while loop is terminated. Example Code in Pytho-Note-2-while loop name='' while name!='your name': print('please type your name') name=input() prin ...
2017-4-10 23:00

Python-Note-2-While-loop-statements

While loop while loop in Python while condition: clause Example a=1 b=0 while a5: b=a+b a=a+1 print('the sum is ' +str(a)) while loop in Matlab while condition clause; end Example a=1; b=0 ...
2017-4-10 21:50

Python-Note-1-If-else-statements

1, If statements if condition: xxxx Example: name='alibaba' if name=='alibaba': print('My name is alibaba') 2, else statements Example: name='alibaba' if name=='alibaba': print('My name is al ...
2017-4-10 17:47

matlab-plotyy

=plotyy(t,belt.import*2000,t,belt.speed); xlim(hAx(1), ); xlim(hAx(2), ); % set(hAx,'linewidth',1.5) set(hLine1,'linewidth',1.5); set(hLine2,'linewidth',1.5,'linestyle',':'); ylabel(hAx(1),'Loading rate ','FontSize',10); ylabel(hAx ...
2017-2-14 19:47
全部博文
Python 笔记