Docsity
Docsity

Prepare-se para as provas
Prepare-se para as provas

Estude fácil! Tem muito documento disponível na Docsity


Ganhe pontos para baixar
Ganhe pontos para baixar

Ganhe pontos ajudando outros esrudantes ou compre um plano Premium


Guias e Dicas
Guias e Dicas


introdução sobre a linguagem de computação python, Esquemas de Ciência Cognitiva

introdução sobre a linguagem de computação python

Tipologia: Esquemas

2019

Compartilhado em 21/09/2019

son-jyren-2
son-jyren-2 🇧🇷

5

(1)

3 documentos

1 / 47

Toggle sidebar

Esta página não é visível na pré-visualização

Não perca as partes importantes!

bg1
Why Program?
Chapter 1
Python for Informatics: Exploring Information
www.pythonlearn.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f

Pré-visualização parcial do texto

Baixe introdução sobre a linguagem de computação python e outras Esquemas em PDF para Ciência Cognitiva, somente na Docsity!

Why Program?

Chapter 1

Python for Informatics: Exploring Information www.pythonlearn.com

Computers want to be helpful...

  • Computers are built for one purpose - to do things for us
  • But we need to speak their language to describe what we want done
  • Users have it easy - someone already put many different programs (instructions) into the computer and users just pick the ones we want to use

What Next?

What Next?

What Next?

What Next?

What Next?

What Next?

What Next?

Users vs. Programmers

  • Users see computers as a set of tools - word processor, spreadsheet, map, todo list, etc.
  • Programmers learn the computer “ways” and the computer language
  • Programmers have some tools that allow them to build new tools
  • Programmers sometimes write tools for lots of users and sometimes programmers write little “helpers” for themselves to automate a task

Computer

Hardware + Software

....^ Networks

From a software creator’s 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 they 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.

Data Information

User

Programmer

What is Code? Software?

A Program?

  • A sequence of stored instructions

It is a little piece of our intelligence in the computer

It 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 out

  • A piece of creative art - particularly when we do a good job on user experience

Programs for

Humans...

http://www.youtube.com/watch?v=vlzwuFkn88U

Programs for

Humans...

while music is playing: Left hand out and up Right hand out and up Flip Left hand Flip Right hand Left hand to right shoulder Right hand to left shoulder Left hand to back of head Right ham to back of head Left hand to right hit Right hand to left hit Left hand on left bottom Right hand on right bottom Wiggle Wiggle

Jump http://www.youtube.com/watch?v=vlzwuFkn88U

Programs for

Humans...

while music is playing: Left hand out and up Right hand out and up Flip Left hand Flip Right hand Left hand to right shoulder Right hand to left shoulder Left hand to back of head Right hand to back of head Left hand to right hip Right hand to left hip Left hand on left bottom Right hand on right bottom Wiggle Wiggle

Jump http://www.youtube.com/watch?v=vlzwuFkn88U

Programs for Python...

name = raw_input('Enter file:') handle = open(name, 'r') text = handle.read() words = text.split()

counts = dict() for word in words: counts[word] = counts.get(word,0) + 1 bigcount = None bigword = None

for word,count in counts.items(): if bigcount is None or count > bigcount: bigword = word bigcount = count print bigword, bigcount

python words.py
Enter file: words.txt
to 16
python words.py
Enter file: clown.txt
the 7

http://upload.wikimedia.org/wikipedia/commons/3/3d/RaspberryPi.jpg

Software

Input and Output Devices

Central Processing Unit

Main Memory

Secondary Memory

Generic
Computer

What Next?

Software

Input and Output Devices

Central Processing Unit

Main Memory

Secondary Memory

Generic
Computer

What Next?

if x< 3: print

Software

Input and Output Devices

Central Processing Unit

Main Memory

Secondary Memory

Machine
Language

What Next?

01001001 00111001