上海交通大学:《Computational Thinking and Approach》教学资源(课件讲稿)Something You Should Know

上游充通大 ParisTech SHANGHAI JIAO TONG UNIVERSITY INSTITUT DES SCIENCES ET TECHNOLOGIES PARIS INSTITUTE OF TECHNOLOGY Something You Should Know Computational Thinking and Approach
Something You Should Know Computational Thinking and Approach

上游充通大 ParisTech SHANGHAI JIAO TONG UNIVERSITY INSTITUT DES SCIENCES ET TECHNOLOGIES PARIS INSTITUTE OF TECHNOLOGY ntroduction 。Program paradigms -Imperative,functional,declarative,object-oriented ·Python Multi-paradimed Interpreter:.py is translated (not compiled)to byte code,and then is execute on Virtual machine of Python Software development process
Introduction • Program paradigms – Imperative, functional, declarative, object-oriented • Python – Multi-paradimed – Interpreter: .py is translated (not compiled) to byte code, and then is execute on Virtual machine of Python • Software development process

上游充通大 ParisTech SHANGHAI JIAO TONG UNIVERSITY INSTITUT DES SCIENCES ET TECHNOLOGIES PARIS INSTITUTE OF TECHNOLOGY ntroduction Three key elements of Computer Science Design,Analysis,experimentation Two key elements of to develop a solution to a problem Data structure and Algorithm 。Modular programing 。Algorithm analysis Time and Space Big-O notation
Introduction • Three key elements of Computer Science – Design, Analysis, experimentation • Two key elements of to develop a solution to a problem – Data structure and Algorithm • Modular programing • Algorithm analysis – Time and Space – Big-O notation

上游充通大 ParisTech SHANGHAI JIAO TONG UNIVERSITY INSTITUT DES SCIENCES ET TECHNOLOGIES PARIS INSTITUTE OF TECHNOLOGY BUILT-IN TYPE AND EXPRESSIONS
BUILT-IN TYPE AND EXPRESSIONS

上游充通大 ParisTech SHANGHAI JIAO TONG UNIVERSITY INSTITUT DES SCIENCES ET TECHNOLOGIES PARIS INSTITUTE OF TECHNOLOGY Object,variable and type Object is everywhere in Python Variable is a label that you could stick to any object Object has a type,variables do not have it The type of the object referred by 'toto' Mutable and immutable objects >>type('Hello,World!) Int,float,string,tuple >>>type(17) -List,dictionary,others... >>type(1.02)
Object, variable and type • Object is everywhere in Python • Variable is a label that you could stick to any object • Object has a type, variables do not have it – The type of the object referred by ‘toto’ • Mutable and immutable objects – Int, float, string, tuple – List, dictionary, others… >>> type('Hello, World!') >>> type(17) >>> type(1.02)

上游充通大 ParisTech SHANGHAI JIAO TONG UNIVERSITY INSTITUT DES SCIENCES ET TECHNOLOGIES PARIS INSTITUTE OF TECHNOLOGY Names (identifier) 。Rule: Every identifier must begin with a letter or underscore (")followed by any sequence of letters,digits,or underscores. ·Reserved word Words used in controls:if,else,try... -Words used to specify:global,class Types are not reserved word list,float
Names (identifier) • Rule: – Every identifier must begin with a letter or underscore (“_”), followed by any sequence of letters, digits, or underscores. • Reserved word – Words used in controls: if, else, try… – Words used to specify: global, class • Types are not reserved word – list, float…

上游充通大 ParisTech SHANGHAI JIAO TONG UNIVERSITY INSTITUT DES SCIENCES ET TECHNOLOGIES PARIS INSTITUTE OF TECHNOLOGY Order of the execution Operations Low Operator Description (from lowest precedences to highest precedences lambda Lambda expression or Boolean OR and Boolean AND not x Boolean NOT 1n,not1n,18,1snot,,>=,◇,1=,= Comparisons,including membership tests and identity tests, Bitwise OR A Bitwise XOR Bitwise AND > Shifts Addition and subtraction *,1,/1,8 Multiplication,division,remainder +X-X ~X Positive,negative,bitwise NOT ★女 Exponentiation x[index],x[index:index],x(arguments...),x.attribute Subscription,slicing,call,attribute reference High (expressions...),[expressions...],(key:datum...},expressions... Binding or tuple display,list display,dictionary display,string conversion
Order of the execution Operations Low High

上游充通大 ParisTech SHANGHAI JIAO TONG UNIVERSITY INSTITUT DES SCIENCES ET TECHNOLOGIES PARIS INSTITUTE OF TECHNOLOGY Operation Basic operation on different type objects ·Type of the results: -bool->Int->double->float.... -20/7&20.0/7 Never trust =with float Application on mutable and immutable object: -a=(1,2) a=[1,2] -b=(3,4) b=[3,4] a+=b,a=a+b a+=b,a=a+b
Operation • Basic operation on different type objects • Type of the results: – bool->Int->double->float…. – 20/7 & 20.0/7 • Never trust == with float • Application on mutable and immutable object: – a=(1,2) – b=(3,4) – a+=b, a=a+b a=[1,2] b=[3,4] a+=b, a=a+b

上降充通大 ParisTech SHANGHAI JIAO TONG UNIVERSITY INSTITUT DES SCIENCES ET TECHNOLOGIES PARIS INSTITUTE OF TECHNOLOGY Very important objects 。 String File object ·List Mutable!!!! Dictionary All functions associated with: -append,remove,len,index [][][5],[:4],slicing,negative index
Very important objects • String • File object • List – Mutable!!!! • Dictionary • All functions associated with: – append, remove, len, index – [], [:],[:5], [::4], slicing, negative index

上游充通大 ParisTech SHANGHAI JIAO TONG UNIVERSITY INSTITUT DES SCIENCES ET TECHNOLOGIES PARIS INSTITUTE OF TECHNOLOGY String Formatting 。Format%value %. ·%s,%d,%f,%10.5f >>>"compare号10fand号0.20f"号(3.14,3.14) 10
String Formatting • Format % value • %. • %s, %d, %f, %10.5f >>> “compare %10f and %0.20f” % (3.14, 3.14) 10
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 上海交通大学:《Computational Thinking and Approach》教学资源(课件讲稿)Lecture10 ALGORITHM DESIGN AND ANALYSIS To the Classic.pdf
- 上海交通大学:《Computational Thinking and Approach》教学资源(课件讲稿)Lecture09 SIMULATION AND DESIGN Real-world problem.pdf
- 上海交通大学:《Computational Thinking and Approach》教学资源(课件讲稿)Lecture08 DATA COLLECTION Massive data representation and processing.pdf
- 上海交通大学:《Computational Thinking and Approach》教学资源(课件讲稿)Lecture07 OBJECT ORIENTED DEVELOPMENT Class and Object.pdf
- 上海交通大学:《Computational Thinking and Approach》教学资源(课件讲稿)Lecture06 OBJECTS AND GRAPHICS GUI.pdf
- 上海交通大学:《Computational Thinking and Approach》教学资源(课件讲稿)Lecture05 ITERATION Control Structure.pdf
- 上海交通大学:《Computational Thinking and Approach》教学资源(课件讲稿)Lecture04 MODULAR PROGRAMMING Functions.pdf
- 上海交通大学:《Computational Thinking and Approach》教学资源(课件讲稿)Lecture03 CONDITIONALS AND SEQUENCES Strings, lists and file objects.pdf
- 上海交通大学:《Computational Thinking and Approach》教学资源(课件讲稿)Lecture02.pdf
- 上海交通大学:《Computational Thinking and Approach》教学资源(课件讲稿)Lecture01.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资料_往年试卷.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资料_管程.docx
- 上海交通大学:《操作系统 Operating System》课程教学资料(Java)Java学习笔记(JAVA的面向对象编程——课堂笔记).doc
- 上海交通大学:《操作系统 Operating System》课程教学资料(Java)JAVA多线程编程详解(详细操作例子).doc
- 上海交通大学:《操作系统 Operating System》课程教学资料(Java)Java多线程编程.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资料(Java)Java多线程应用实例(制作烟花效果).doc
- 上海交通大学:《操作系统 Operating System》课程教学资料(Java)Java Primer.pdf
- 上海交通大学:《操作系统 Operating System》课程教学资料(JAVA PPT)lec5.ppt
- 上海交通大学:《操作系统 Operating System》课程教学资料(JAVA PPT)lec4.ppt
- 上海交通大学:《操作系统 Operating System》课程教学资料(JAVA PPT)lec3.ppt
- 上海交通大学:《C++程序设计与实践》课程教学资源(学习资料)C++练习(题目).pdf
- 上海交通大学:《C++程序设计与实践》课程教学资源(学习资料)C++练习(答案).pdf
- 上海交通大学:《C++程序设计与实践》课程教学资源(学习资料)基于MFC的对话框程序.pdf
- 上海交通大学:《C++程序设计与实践》课程教学资源(课件讲稿)总复习(共八讲).pdf
- 上海交通大学:《C++程序设计与实践》课程教学资源(讲稿)第1讲 C++语言概述及数据类型(何其昌).pdf
- 上海交通大学:《C++程序设计与实践》课程教学资源(讲稿)第2讲 C++程序的流程控制.pdf
- 上海交通大学:《C++程序设计与实践》课程教学资源(讲稿)第3讲 函数与结构化程序设计.pdf
- 上海交通大学:《C++程序设计与实践》课程教学资源(讲稿)第4讲 数组与结构.pdf
- 上海交通大学:《C++程序设计与实践》课程教学资源(讲稿)第5讲 指针与引用.pdf
- 上海交通大学:《C++程序设计与实践》课程教学资源(讲稿)第6讲 C++类(1/2).pdf
- 上海交通大学:《C++程序设计与实践》课程教学资源(讲稿)第7讲 C++类(2/2).pdf
- 上海交通大学:《C++程序设计与实践》课程教学资源(讲稿)第8讲 Windows应用程序设计.pdf
- 上海交通大学:《C++程序设计与实践》课程教学资源(讲义)方波生成器项目报告书.doc
- 《中文信息学报》:中文组织机构名称与简称的识别.pdf
- 《计算机系统结构》课程教学资源(电子书籍)《Computer Organization and Design》THE HARDWARE / SOFTWARE INTERFACE(DAVID A. PATTERSON JOHN L. HENNESSY,Fourth Edtion,彩色版).pdf
- 《计算机系统结构》课程教学资源(电子书籍)《Computer Systems》A Programmer's Perspective(Randal E. Bryant、David R. O'Hallaron,THIRD EDITION).pdf
- 机械工业出版社:计算机科学丛书《计算机组成与设计:硬件、软件接口》电子教材(中文第4版).pdf
- 上海交通大学:《C程序与算法设计》课程教学资源(课件讲稿)Lecture 01 课程简介及编程基础(绳伟光).pdf
- 上海交通大学:《C程序与算法设计》课程教学资源(课件讲稿)Lecture 10 C程序调试.pdf
- 上海交通大学:《C程序与算法设计》课程教学资源(课件讲稿)Lecture 11 字符串.pdf