Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Introdução à Programação com Python - Parte 2
Search
Ana Paula Mendes
April 12, 2020
Programming
3
160
Introdução à Programação com Python - Parte 2
Sumário:
Entrada e Saída;
Listas;
Tuplas;
Dicionários.
Ana Paula Mendes
April 12, 2020
Tweet
Share
More Decks by Ana Paula Mendes
See All by Ana Paula Mendes
Aprendendo sobre Complexidade de Algoritmos com o Timsort
anapaulamendes
0
190
Criando uma API async com rate limit e testável
anapaulamendes
0
53
Backend + IA: Criando uma API para inferir diagnóstico de diabetes
anapaulamendes
0
78
Já ouviu a palavra do FastAPI hoje?
anapaulamendes
1
260
Desbravando HTTP com http.server
anapaulamendes
2
180
Dados categóricos em árvore de decisão utilizando libs Python
anapaulamendes
1
670
Introdução à Programação com Python - Parte 3
anapaulamendes
1
100
Introdução à Programação com Python - Parte 4
anapaulamendes
1
80
Construindo experiências antes do mercado
anapaulamendes
0
150
Other Decks in Programming
See All in Programming
AIコーディングエージェント(Gemini)
kondai24
0
150
AIと協働し、イベントソーシングとアクターモデルで作る後悔しないアーキテクチャ Regret-Free Architecture with AI, Event Sourcing, and Actors
tomohisa
5
18k
Building AI Agents with TypeScript #TSKaigiHokuriku
izumin5210
6
1.2k
「文字列→日付」の落とし穴 〜Ruby Date.parseの意外な挙動〜
sg4k0
0
360
Level up your Gemini CLI - D&D Style!
palladius
1
170
配送計画の均等化機能を提供する取り組みについて(⽩⾦鉱業 Meetup Vol.21@六本⽊(数理最適化編))
izu_nori
0
120
目的で駆動する、AI時代のアーキテクチャ設計 / purpose-driven-architecture
minodriven
11
3.9k
Google Antigravity and Vibe Coding: Agentic Development Guide
mickey_kubo
2
130
Integrating WordPress and Symfony
alexandresalome
0
120
connect-python: convenient protobuf RPC for Python
anuraaga
0
350
Why Kotlin? 電子カルテを Kotlin で開発する理由 / Why Kotlin? at Henry
agatan
2
6.2k
FluorTracer / RayTracingCamp11
kugimasa
0
180
Featured
See All Featured
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
1
75
The Art of Programming - Codeland 2020
erikaheidi
56
14k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
GraphQLとの向き合い方2022年版
quramy
50
14k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.6k
How to Think Like a Performance Engineer
csswizardry
28
2.3k
Automating Front-end Workflow
addyosmani
1371
200k
Become a Pro
speakerdeck
PRO
30
5.7k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.8k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
196
69k
4 Signs Your Business is Dying
shpigford
186
22k
[RailsConf 2023] Rails as a piece of cake
palkan
58
6.1k
Transcript
ANA NO TERMINAL Ana Paula Mendes I n t r
o d u ç ã o à p r o g r a m a ç ã o c o m P y t h o n - p a r t e 2 @ananoterminal • @ananoterminal • @ananoterminal •
@ananoterminal • BACHARELANDA EM CIÊNCIA DA COMPUTAÇÃO - UFPI TÉCNICA
EM DESENVOLVIMENTO DE SOFTWARE - IFPI DESENVOLVEDORA FULL STACK AMO OPEN SOURCE Boas vindas again! ana no terminal ana Paula mendes
@ananoterminal • @ananoterminal • @ananoterminal • Entrada e Saída
entrada - input nome = input("Nome") idade = int(input("Idade: "))
altura = float(input("Altura: ")) @ananoterminal •
saída - print print("Hello World!") print("Seu nome é: ", nome)
print("Sua idade é: {}".format(idade)) print("Sua altura é: " + str(altura)) @ananoterminal •
@ananoterminal • @ananoterminal • @ananoterminal • Listas
Valores em uma lista Lista vazia vazia = [ ]
lista com itens frutas = ["banana", "melancia", "abacate"] @ananoterminal •
Métodos de lista adicionar itens frutas.append("uva") ordernar itens frutas.sort() @ananoterminal
• tamanho da lista len(frutas) acessar itens frutas[n]
Operações com lista concatenação de listas [1, 2, 3] +
[4, 5, 6] repetição de listas [1, 2, 3] * 3 @ananoterminal •
Operações com lista fatiamento de listas lista = [0, 1,
2, 3, 4, 5] lista[:4] lista[3:] lista[1:3] remoção de itens del lista[n] lista.pop(n) @ananoterminal •
@ananoterminal • @ananoterminal • @ananoterminal • Tuplas
Valores em uma tupla Tupla vazia vazia = () tupla
com 1 item tupla = 1, tupla = (1,) @ananoterminal • tupla com vários itens tupla = 1, 2, 3, 4, 5 tupla = (1, 2, 3, 4, 5)
Métodos de tupla ACESSA ITENS COMO NA LISTA; O FATIAMENTO
É COMO NA LISTA; É IMUTÁVEL, PORTANTO NÃO É POSSÍVEL REATRIBUIR VALORES NUMA TUPLA; É POSSÍVEL ADICIONAR ITENS APENAS CONCATENANDO TUPLAS. ZimCore Hubs • Apr. 30, 2020
Utilidade Pública Sem tupla a = 1 b = 2
temp = a a = b b = temp @ananoterminal • com tupla a = 1 b = 2 a, b = b, a
@ananoterminal • @ananoterminal • @ananoterminal • Dicionários
Valores em um dicionário dicionário vazio vazio = {} dicionário
com itens estudante = {"nome": "Ana", "idade": 22} @ananoterminal •
Métodos de dicionário adicionar itens estudante["matricula"] = "2020123" ordernar itens
sorted(estudante.items()) sorted(estudante.keys()) [('idade', 22), ('nome', 'Ana')] ['idade', 'nome'] @ananoterminal • tamanho do dicionário len(estudante)
Métodos de dicionário Acessar valores estudante["nome"] Acessar as chaves estudante.keys()
@ananoterminal • Remoção de itens del estudante["idade"] estudante.pop("idade") acessar os itens estudante.items()
@ananoterminal • ANA PAULA MENDES @ananoterminal TWITTER INSTAGRAM E-MAIL
[email protected]
obrigada :)