电子文档交易市场
安卓APP | ios版本
电子文档交易市场
安卓APP | ios版本

Py4Inf-01-Intro-PrintPy4Inf-01-Intro-Print

16页
  • 卖家[上传人]:海天
  • 文档编号:23993777
  • 上传时间:2017-10-22
  • 文档格式:PDF
  • 文档大小:3.04MB
  • / 16 举报 版权申诉 马上下载
  • 文本预览
  • 下载提示
  • 常见问题
    • 1、Why Program?Chapter 1Python for Informatics: Exploring IUnless otherwise noted, the content of this course material is licensed under a Creative Commons Attribution 3.0 License.htp:/creativecommons.org/licenses/by/3.0/.Copyright 2010- Charles SeverancePre-Requisite: Please Instal Pythonhttp:/ to the Introduction.Computers want to be helpful.Computers are built for one purpose - to do things for usBut we need to speak their language to describe what we want doneUsers have it easy - someone alread

      2、y put many different programs (instructions) into the computer and users just pick the ones we want to useWhatNext?WhatNext?WhatNext?WhatNext?WhatNext?WhatNext?WhatNext?Programmers Anticipate NeedsiPhone Applications are a marketiPhone Applications have over 3 Bilion downloadsProgrammers have left their jobs to be full-time iPhone developersProgrammers know the ways of the programPickMe!PickMe!PickMe!PickMe!PayMe!PickMe!Users .vs. ProgrammersUsers see computers as a set of tools - word processor

      3、, spreadsheet, map, todo list, etc.Programmers learn the computer “ways” and the computer languageProgrammers have some tools that alow them to build new toolsProgrammers sometimes write tools for lots of users and sometimes programmers write little “helpers” for themselves to automate a taskComputerHardware + SoftwareNetworks.From a software creators point of view, we build the software. The end users (stakeholders/actors) are our masters - who we want to please - often they pay us money when t

      4、hey are pleased. But the data, information, and networks are our problem to solve on their behalf. The hardware and software are our friends and allies in this quest.InformationDataUserProgrammerWhy be a programer?To get some task done - we are the user and programmerClean up survey dataTo produce something for others to use - a programming jobFix a performance problem in the Sakai softwareAdd guestbook to a web siteWhat is Code? Software? A Program?A sequence of stored instructions It is a litt

      5、le piece of our intelligence in the computerIt is a little piece of our intelligence we can give to others - we figure something out and then we encode it and then give it to someone else to save them the time and energy of figuring it outA piece of creative art - particularly when we do a god job on user experiencePrograms for Humans.http:/ for Humans.while music is playing:Left hand out and upRight hand out and upFlip Left handFlip Right handLeft hand to right shoulderRight hand to left should

      6、erLeft hand to back of headRight ham to back of headLeft hand to right hitRight hand to left hitLeft hand on left bottomRight hand on right bottomWigleWigleJumphttp:/ for Humans.while music is playing:Left hand out and upRight hand out and upFlip Left handFlip Right handLeft hand to right shoulderRight hand to left shoulderLeft hand to back of headRight ham to back of headLeft hand to right hitRight hand to left hitLeft hand on left bottomRight hand on right bottomWigleWigleJumphttp:/ for Humans

      7、.while music is playing:Left hand out and upRight hand out and upFlip Left handFlip Right handLeft hand to right shoulderRight hand to left shoulderLeft hand to back of headRight hand to back of headLeft hand to right hipRight hand to left hipLeft hand on left bottomRight hand on right bottomWigleWigleJumphttp:/ clown ran after the car and the car ran into the tent and the tent fell down on the clown and the car Programs for Python. Programs for Python.name = raw_input(Enter file:)handle = open(

      8、name, r)text = handle.read()words = text.split()counts = dict()for word in words:countsword = counts.get(word,0) + 1bigcount = Nonebigword = Nonefor word,count in counts.items():if bigcount is None or count bigcount:bigword = wordbigcount = countprint bigword, bigcountpython words.py Enter file: words.txtto 16python words.py Enter file: clown.txtthe 7Hardware Architecturehttp:/upload.wikimedia.org/wikipedia/commons/3/3d/RaspberryPi.jpgSoftwareInputand OutputDevicesCentralProcessingUnitMainMemory

      9、SecondaryMemoryGenericComputerWhatNext?DefinitionsCentral Processing Unit: Runs the Program - The CPU is always wondering “what to do next”? Not the brains exactly - very dumb but very very fastInput Devices: Keyboard, Mouse, Touch ScreenOutput Devices: Screen, Speakers, Printer, DVD BurnerMain Memory: Fast smal temporary storage - lost on reboot - aka RAMSecondary Memory: Slower large permanent storage - lasts until deleted - disk drive / memory stickWhatNext?SoftwareInputand OutputDevicesCentralProcessingUnitMainMemorySecondaryMemoryGener

      《Py4Inf-01-Intro-PrintPy4Inf-01-Intro-Print》由会员海天分享,可在线阅读,更多相关《Py4Inf-01-Intro-PrintPy4Inf-01-Intro-Print》请在金锄头文库上搜索。

      点击阅读更多内容
    关于金锄头网 - 版权申诉 - 免责声明 - 诚邀英才 - 联系我们
    手机版 | 川公网安备 51140202000112号 | 经营许可证(蜀ICP备13022795号)
    ©2008-2016 by Sichuan Goldhoe Inc. All Rights Reserved.