SlideShare uma empresa Scribd logo
1 de 8
Baixar para ler offline
Dojo de Aprendizagem de
Programação (DAProg)
Metodologia
Paulo Cezar de Oliveira
Adolfo Gustavo Serra Seca Neto
Maria Cláudia Figueiredo Pereira Emer
2 / 8
Elixir - expressões simples
●
Iex> 3.14 → ponto flutuante
●
iex> "Hello" → string
●
iex> :foo → átomo (constante cujo o nome é seu valor)
●
+, -, *, / → aritmética
●
iex> div(10, 5) / iex> rem(10, 3) → divisão e resto da divisão
●
or ; and; not → operadores lógicos
– Para “or”, “and” e “not” o primeiro argumento tem que ser um booleando
(true ou false).
●
==, !=, ===, !==, <=, >=, < e > → comparação
●
iex> name = "Sean" | iex> "Hello #{name}" | "Hello Sean" →
interpolação de string.
●
iex> name = "Sean" | iex> "Hello " <> name | "Hello Sean" →
concatenação de string
●
iex> String.length "Hello" – 5
https://elixirschool.com/pt/https://elixirschool.com/pt/https://elixirschool.com/pt/https://elixirschool.com/pt/
3 / 8
Elixir - expressões simples
●
iex> [3.14, :pie, "Apple"] | [3.14, :pie, "Apple"] → listas
●
Funções
defmodule Greeter do
def hello(name) do
"Hello, " <> name
end
end
iex> Greeter.hello("Sean")
"Hello, Sean"
4 / 8
Entrega
1. Todo o código desenvolvido deve ser colado no site
https://ghostbin.com/
2. Passo a a passo para o ghostbin
1. acessar o link
2. em new past colocar o seu nome
3. colar o código desenvolvido
4. em plain text escolher Elixir
5. salvar
6. entregar o link depois de salvar no google form
7. https://goo.gl/forms/LZc5evN6yVXveaNb2
5 / 8
Atividade em duplas
●
10 minutos por dupla
●
Imprima uma lista de 1 a 100, um em cada linha, com as
seguintes exceções: Números divisíveis por 3 deve aparecer
como 'Fizz' ao invés do número; Números divisíveis por 5 devem
aparecer como 'Buzz' ao invés do número; Números divisíveis
por 3 e 5 devem aparecer como 'FizzBuzz' ao invés do número'.
1. Imprima todos os números na tela
2. Imprima na tela os números e a palavra fizz para os múltiplos
de 3,
3. Imprima na tela os números, a palavra fizz e para os múltiplos
de 5 a palavra buzz
4. Imprima na tela os números, as palavras fizz e buzz e a
expressão fizzbuzz para os múltiplos de 3 e 5.
6 / 8
Atividade em duplas
●
10 minutos por dupla
●
Escreva um programa que analise se uma string é palíndromo .
●
Por exemplo, “O galo ama o lago”, “A base do teto desaba”, “O
trote torto”, “A rua Laura”, “Anotaram a data da maratona”.
Anilina, arara ,asa, ata, ele, esse, matam, mirim, mussum
1. Capture a string;
2. Imprima a string;
3. Inverta a string;
4. Compare a string;
5. Imprima se a string é palíndromo.
7 / 8
Atividade em duplas
●
10 minutos por dupla
●
Escreva um programa que gere todos os anagramas potenciais
de uma string.
●
Por exemplo, os anagramas potenciais de "biro" são: biro bior brio
broi boir bori ibro ibor irbo irob iobr iorb rbio rboi ribo riob roib robi
obir obri oibr oirb orbi orib
1. Capture a string;
2. Imprima a string;
3. misture os caracteres da string;
4. imprima a lista de strings;
8 / 8
Retrospectiva
1.O QUE APRENDEMOS
2.O QUE PODE MELHORAR.
3.PONTOS POSITIVOS.
4.PONTOS NEGATIVOS.

Mais conteúdo relacionado

Último

SLIDE DE Revolução Mexicana 1910 da disciplina cultura espanhola
SLIDE DE Revolução Mexicana 1910 da disciplina cultura espanholaSLIDE DE Revolução Mexicana 1910 da disciplina cultura espanhola
SLIDE DE Revolução Mexicana 1910 da disciplina cultura espanholacleanelima11
 
Dicionário de Genealogia, autor Gilber Rubim Rangel
Dicionário de Genealogia, autor Gilber Rubim RangelDicionário de Genealogia, autor Gilber Rubim Rangel
Dicionário de Genealogia, autor Gilber Rubim RangelGilber Rubim Rangel
 
Araribá slides 9ano.pdf para os alunos do medio
Araribá slides 9ano.pdf para os alunos do medioAraribá slides 9ano.pdf para os alunos do medio
Araribá slides 9ano.pdf para os alunos do medioDomingasMariaRomao
 
planejamento_estrategico_-_gestao_2021-2024_16015654.pdf
planejamento_estrategico_-_gestao_2021-2024_16015654.pdfplanejamento_estrategico_-_gestao_2021-2024_16015654.pdf
planejamento_estrategico_-_gestao_2021-2024_16015654.pdfmaurocesarpaesalmeid
 
Considere a seguinte situação fictícia: Durante uma reunião de equipe em uma...
Considere a seguinte situação fictícia:  Durante uma reunião de equipe em uma...Considere a seguinte situação fictícia:  Durante uma reunião de equipe em uma...
Considere a seguinte situação fictícia: Durante uma reunião de equipe em uma...azulassessoria9
 
3-Livro-Festa-no-céu-Angela-Lago.pdf-·-versão-1.pdf
3-Livro-Festa-no-céu-Angela-Lago.pdf-·-versão-1.pdf3-Livro-Festa-no-céu-Angela-Lago.pdf-·-versão-1.pdf
3-Livro-Festa-no-céu-Angela-Lago.pdf-·-versão-1.pdfBlendaLima1
 
Projeto de Extensão - ENGENHARIA DE SOFTWARE - BACHARELADO.pdf
Projeto de Extensão - ENGENHARIA DE SOFTWARE - BACHARELADO.pdfProjeto de Extensão - ENGENHARIA DE SOFTWARE - BACHARELADO.pdf
Projeto de Extensão - ENGENHARIA DE SOFTWARE - BACHARELADO.pdfHELENO FAVACHO
 
PRÁTICAS PEDAGÓGICAS GESTÃO DA APRENDIZAGEM
PRÁTICAS PEDAGÓGICAS GESTÃO DA APRENDIZAGEMPRÁTICAS PEDAGÓGICAS GESTÃO DA APRENDIZAGEM
PRÁTICAS PEDAGÓGICAS GESTÃO DA APRENDIZAGEMHELENO FAVACHO
 
Reta Final - CNU - Gestão Governamental - Prof. Stefan Fantini.pdf
Reta Final - CNU - Gestão Governamental - Prof. Stefan Fantini.pdfReta Final - CNU - Gestão Governamental - Prof. Stefan Fantini.pdf
Reta Final - CNU - Gestão Governamental - Prof. Stefan Fantini.pdfWagnerCamposCEA
 
Estudar, para quê? Ciência, para quê? Parte 1 e Parte 2
Estudar, para quê?  Ciência, para quê? Parte 1 e Parte 2Estudar, para quê?  Ciência, para quê? Parte 1 e Parte 2
Estudar, para quê? Ciência, para quê? Parte 1 e Parte 2Maria Teresa Thomaz
 
o ciclo do contato Jorge Ponciano Ribeiro.pdf
o ciclo do contato Jorge Ponciano Ribeiro.pdfo ciclo do contato Jorge Ponciano Ribeiro.pdf
o ciclo do contato Jorge Ponciano Ribeiro.pdfCamillaBrito19
 
2° ANO - ENSINO FUNDAMENTAL ENSINO RELIGIOSO
2° ANO - ENSINO FUNDAMENTAL ENSINO RELIGIOSO2° ANO - ENSINO FUNDAMENTAL ENSINO RELIGIOSO
2° ANO - ENSINO FUNDAMENTAL ENSINO RELIGIOSOLeloIurk1
 
Construção (C)erta - Nós Propomos! Sertã
Construção (C)erta - Nós Propomos! SertãConstrução (C)erta - Nós Propomos! Sertã
Construção (C)erta - Nós Propomos! SertãIlda Bicacro
 
Atividade - Letra da música Esperando na Janela.
Atividade -  Letra da música Esperando na Janela.Atividade -  Letra da música Esperando na Janela.
Atividade - Letra da música Esperando na Janela.Mary Alvarenga
 
Slides Lição 05, Central Gospel, A Grande Tribulação, 1Tr24.pptx
Slides Lição 05, Central Gospel, A Grande Tribulação, 1Tr24.pptxSlides Lição 05, Central Gospel, A Grande Tribulação, 1Tr24.pptx
Slides Lição 05, Central Gospel, A Grande Tribulação, 1Tr24.pptxLuizHenriquedeAlmeid6
 
PROJETO DE EXTENSÃO - EDUCAÇÃO FÍSICA BACHARELADO.pdf
PROJETO DE EXTENSÃO - EDUCAÇÃO FÍSICA BACHARELADO.pdfPROJETO DE EXTENSÃO - EDUCAÇÃO FÍSICA BACHARELADO.pdf
PROJETO DE EXTENSÃO - EDUCAÇÃO FÍSICA BACHARELADO.pdfHELENO FAVACHO
 
Introdução a Caminhada do Interior......
Introdução a Caminhada do Interior......Introdução a Caminhada do Interior......
Introdução a Caminhada do Interior......suporte24hcamin
 
PRÉDIOS HISTÓRICOS DE ASSARÉ Prof. Francisco Leite.pdf
PRÉDIOS HISTÓRICOS DE ASSARÉ Prof. Francisco Leite.pdfPRÉDIOS HISTÓRICOS DE ASSARÉ Prof. Francisco Leite.pdf
PRÉDIOS HISTÓRICOS DE ASSARÉ Prof. Francisco Leite.pdfprofesfrancleite
 
COMPETÊNCIA 4 NO ENEM: O TEXTO E SUAS AMARRACÕES
COMPETÊNCIA 4 NO ENEM: O TEXTO E SUAS AMARRACÕESCOMPETÊNCIA 4 NO ENEM: O TEXTO E SUAS AMARRACÕES
COMPETÊNCIA 4 NO ENEM: O TEXTO E SUAS AMARRACÕESEduardaReis50
 
PROVA - ESTUDO CONTEMPORÂNEO E TRANSVERSAL: COMUNICAÇÃO ASSERTIVA E INTERPESS...
PROVA - ESTUDO CONTEMPORÂNEO E TRANSVERSAL: COMUNICAÇÃO ASSERTIVA E INTERPESS...PROVA - ESTUDO CONTEMPORÂNEO E TRANSVERSAL: COMUNICAÇÃO ASSERTIVA E INTERPESS...
PROVA - ESTUDO CONTEMPORÂNEO E TRANSVERSAL: COMUNICAÇÃO ASSERTIVA E INTERPESS...azulassessoria9
 

Último (20)

SLIDE DE Revolução Mexicana 1910 da disciplina cultura espanhola
SLIDE DE Revolução Mexicana 1910 da disciplina cultura espanholaSLIDE DE Revolução Mexicana 1910 da disciplina cultura espanhola
SLIDE DE Revolução Mexicana 1910 da disciplina cultura espanhola
 
Dicionário de Genealogia, autor Gilber Rubim Rangel
Dicionário de Genealogia, autor Gilber Rubim RangelDicionário de Genealogia, autor Gilber Rubim Rangel
Dicionário de Genealogia, autor Gilber Rubim Rangel
 
Araribá slides 9ano.pdf para os alunos do medio
Araribá slides 9ano.pdf para os alunos do medioAraribá slides 9ano.pdf para os alunos do medio
Araribá slides 9ano.pdf para os alunos do medio
 
planejamento_estrategico_-_gestao_2021-2024_16015654.pdf
planejamento_estrategico_-_gestao_2021-2024_16015654.pdfplanejamento_estrategico_-_gestao_2021-2024_16015654.pdf
planejamento_estrategico_-_gestao_2021-2024_16015654.pdf
 
Considere a seguinte situação fictícia: Durante uma reunião de equipe em uma...
Considere a seguinte situação fictícia:  Durante uma reunião de equipe em uma...Considere a seguinte situação fictícia:  Durante uma reunião de equipe em uma...
Considere a seguinte situação fictícia: Durante uma reunião de equipe em uma...
 
3-Livro-Festa-no-céu-Angela-Lago.pdf-·-versão-1.pdf
3-Livro-Festa-no-céu-Angela-Lago.pdf-·-versão-1.pdf3-Livro-Festa-no-céu-Angela-Lago.pdf-·-versão-1.pdf
3-Livro-Festa-no-céu-Angela-Lago.pdf-·-versão-1.pdf
 
Projeto de Extensão - ENGENHARIA DE SOFTWARE - BACHARELADO.pdf
Projeto de Extensão - ENGENHARIA DE SOFTWARE - BACHARELADO.pdfProjeto de Extensão - ENGENHARIA DE SOFTWARE - BACHARELADO.pdf
Projeto de Extensão - ENGENHARIA DE SOFTWARE - BACHARELADO.pdf
 
PRÁTICAS PEDAGÓGICAS GESTÃO DA APRENDIZAGEM
PRÁTICAS PEDAGÓGICAS GESTÃO DA APRENDIZAGEMPRÁTICAS PEDAGÓGICAS GESTÃO DA APRENDIZAGEM
PRÁTICAS PEDAGÓGICAS GESTÃO DA APRENDIZAGEM
 
Reta Final - CNU - Gestão Governamental - Prof. Stefan Fantini.pdf
Reta Final - CNU - Gestão Governamental - Prof. Stefan Fantini.pdfReta Final - CNU - Gestão Governamental - Prof. Stefan Fantini.pdf
Reta Final - CNU - Gestão Governamental - Prof. Stefan Fantini.pdf
 
Estudar, para quê? Ciência, para quê? Parte 1 e Parte 2
Estudar, para quê?  Ciência, para quê? Parte 1 e Parte 2Estudar, para quê?  Ciência, para quê? Parte 1 e Parte 2
Estudar, para quê? Ciência, para quê? Parte 1 e Parte 2
 
o ciclo do contato Jorge Ponciano Ribeiro.pdf
o ciclo do contato Jorge Ponciano Ribeiro.pdfo ciclo do contato Jorge Ponciano Ribeiro.pdf
o ciclo do contato Jorge Ponciano Ribeiro.pdf
 
2° ANO - ENSINO FUNDAMENTAL ENSINO RELIGIOSO
2° ANO - ENSINO FUNDAMENTAL ENSINO RELIGIOSO2° ANO - ENSINO FUNDAMENTAL ENSINO RELIGIOSO
2° ANO - ENSINO FUNDAMENTAL ENSINO RELIGIOSO
 
Construção (C)erta - Nós Propomos! Sertã
Construção (C)erta - Nós Propomos! SertãConstrução (C)erta - Nós Propomos! Sertã
Construção (C)erta - Nós Propomos! Sertã
 
Atividade - Letra da música Esperando na Janela.
Atividade -  Letra da música Esperando na Janela.Atividade -  Letra da música Esperando na Janela.
Atividade - Letra da música Esperando na Janela.
 
Slides Lição 05, Central Gospel, A Grande Tribulação, 1Tr24.pptx
Slides Lição 05, Central Gospel, A Grande Tribulação, 1Tr24.pptxSlides Lição 05, Central Gospel, A Grande Tribulação, 1Tr24.pptx
Slides Lição 05, Central Gospel, A Grande Tribulação, 1Tr24.pptx
 
PROJETO DE EXTENSÃO - EDUCAÇÃO FÍSICA BACHARELADO.pdf
PROJETO DE EXTENSÃO - EDUCAÇÃO FÍSICA BACHARELADO.pdfPROJETO DE EXTENSÃO - EDUCAÇÃO FÍSICA BACHARELADO.pdf
PROJETO DE EXTENSÃO - EDUCAÇÃO FÍSICA BACHARELADO.pdf
 
Introdução a Caminhada do Interior......
Introdução a Caminhada do Interior......Introdução a Caminhada do Interior......
Introdução a Caminhada do Interior......
 
PRÉDIOS HISTÓRICOS DE ASSARÉ Prof. Francisco Leite.pdf
PRÉDIOS HISTÓRICOS DE ASSARÉ Prof. Francisco Leite.pdfPRÉDIOS HISTÓRICOS DE ASSARÉ Prof. Francisco Leite.pdf
PRÉDIOS HISTÓRICOS DE ASSARÉ Prof. Francisco Leite.pdf
 
COMPETÊNCIA 4 NO ENEM: O TEXTO E SUAS AMARRACÕES
COMPETÊNCIA 4 NO ENEM: O TEXTO E SUAS AMARRACÕESCOMPETÊNCIA 4 NO ENEM: O TEXTO E SUAS AMARRACÕES
COMPETÊNCIA 4 NO ENEM: O TEXTO E SUAS AMARRACÕES
 
PROVA - ESTUDO CONTEMPORÂNEO E TRANSVERSAL: COMUNICAÇÃO ASSERTIVA E INTERPESS...
PROVA - ESTUDO CONTEMPORÂNEO E TRANSVERSAL: COMUNICAÇÃO ASSERTIVA E INTERPESS...PROVA - ESTUDO CONTEMPORÂNEO E TRANSVERSAL: COMUNICAÇÃO ASSERTIVA E INTERPESS...
PROVA - ESTUDO CONTEMPORÂNEO E TRANSVERSAL: COMUNICAÇÃO ASSERTIVA E INTERPESS...
 

Destaque

AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

Destaque (20)

AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 

Daprog elixir

  • 1. Dojo de Aprendizagem de Programação (DAProg) Metodologia Paulo Cezar de Oliveira Adolfo Gustavo Serra Seca Neto Maria Cláudia Figueiredo Pereira Emer
  • 2. 2 / 8 Elixir - expressões simples ● Iex> 3.14 → ponto flutuante ● iex> "Hello" → string ● iex> :foo → átomo (constante cujo o nome é seu valor) ● +, -, *, / → aritmética ● iex> div(10, 5) / iex> rem(10, 3) → divisão e resto da divisão ● or ; and; not → operadores lógicos – Para “or”, “and” e “not” o primeiro argumento tem que ser um booleando (true ou false). ● ==, !=, ===, !==, <=, >=, < e > → comparação ● iex> name = "Sean" | iex> "Hello #{name}" | "Hello Sean" → interpolação de string. ● iex> name = "Sean" | iex> "Hello " <> name | "Hello Sean" → concatenação de string ● iex> String.length "Hello" – 5 https://elixirschool.com/pt/https://elixirschool.com/pt/https://elixirschool.com/pt/https://elixirschool.com/pt/
  • 3. 3 / 8 Elixir - expressões simples ● iex> [3.14, :pie, "Apple"] | [3.14, :pie, "Apple"] → listas ● Funções defmodule Greeter do def hello(name) do "Hello, " <> name end end iex> Greeter.hello("Sean") "Hello, Sean"
  • 4. 4 / 8 Entrega 1. Todo o código desenvolvido deve ser colado no site https://ghostbin.com/ 2. Passo a a passo para o ghostbin 1. acessar o link 2. em new past colocar o seu nome 3. colar o código desenvolvido 4. em plain text escolher Elixir 5. salvar 6. entregar o link depois de salvar no google form 7. https://goo.gl/forms/LZc5evN6yVXveaNb2
  • 5. 5 / 8 Atividade em duplas ● 10 minutos por dupla ● Imprima uma lista de 1 a 100, um em cada linha, com as seguintes exceções: Números divisíveis por 3 deve aparecer como 'Fizz' ao invés do número; Números divisíveis por 5 devem aparecer como 'Buzz' ao invés do número; Números divisíveis por 3 e 5 devem aparecer como 'FizzBuzz' ao invés do número'. 1. Imprima todos os números na tela 2. Imprima na tela os números e a palavra fizz para os múltiplos de 3, 3. Imprima na tela os números, a palavra fizz e para os múltiplos de 5 a palavra buzz 4. Imprima na tela os números, as palavras fizz e buzz e a expressão fizzbuzz para os múltiplos de 3 e 5.
  • 6. 6 / 8 Atividade em duplas ● 10 minutos por dupla ● Escreva um programa que analise se uma string é palíndromo . ● Por exemplo, “O galo ama o lago”, “A base do teto desaba”, “O trote torto”, “A rua Laura”, “Anotaram a data da maratona”. Anilina, arara ,asa, ata, ele, esse, matam, mirim, mussum 1. Capture a string; 2. Imprima a string; 3. Inverta a string; 4. Compare a string; 5. Imprima se a string é palíndromo.
  • 7. 7 / 8 Atividade em duplas ● 10 minutos por dupla ● Escreva um programa que gere todos os anagramas potenciais de uma string. ● Por exemplo, os anagramas potenciais de "biro" são: biro bior brio broi boir bori ibro ibor irbo irob iobr iorb rbio rboi ribo riob roib robi obir obri oibr oirb orbi orib 1. Capture a string; 2. Imprima a string; 3. misture os caracteres da string; 4. imprima a lista de strings;
  • 8. 8 / 8 Retrospectiva 1.O QUE APRENDEMOS 2.O QUE PODE MELHORAR. 3.PONTOS POSITIVOS. 4.PONTOS NEGATIVOS.