SlideShare ist ein Scribd-Unternehmen logo
1 von 8
Downloaden Sie, um offline zu lesen
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.

Weitere ähnliche Inhalte

Kürzlich hochgeladen

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
 
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
 
Slides Lição 04, Central Gospel, O Tribunal De Cristo, 1Tr24.pptx
Slides Lição 04, Central Gospel, O Tribunal De Cristo, 1Tr24.pptxSlides Lição 04, Central Gospel, O Tribunal De Cristo, 1Tr24.pptx
Slides Lição 04, Central Gospel, O Tribunal De Cristo, 1Tr24.pptxLuizHenriquedeAlmeid6
 
INTERVENÇÃO PARÁ - Formação de Professor
INTERVENÇÃO PARÁ - Formação de ProfessorINTERVENÇÃO PARÁ - Formação de Professor
INTERVENÇÃO PARÁ - Formação de ProfessorEdvanirCosta
 
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
 
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
 
5 bloco 7 ano - Ensino Relogioso- Lideres Religiosos _ Passei Direto.pdf
5 bloco 7 ano - Ensino Relogioso- Lideres Religiosos _ Passei Direto.pdf5 bloco 7 ano - Ensino Relogioso- Lideres Religiosos _ Passei Direto.pdf
5 bloco 7 ano - Ensino Relogioso- Lideres Religiosos _ Passei Direto.pdfLeloIurk1
 
PROVA - ESTUDO CONTEMPORÂNEO E TRANSVERSAL: LEITURA DE IMAGENS, GRÁFICOS E MA...
PROVA - ESTUDO CONTEMPORÂNEO E TRANSVERSAL: LEITURA DE IMAGENS, GRÁFICOS E MA...PROVA - ESTUDO CONTEMPORÂNEO E TRANSVERSAL: LEITURA DE IMAGENS, GRÁFICOS E MA...
PROVA - ESTUDO CONTEMPORÂNEO E TRANSVERSAL: LEITURA DE IMAGENS, GRÁFICOS E MA...azulassessoria9
 
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
 
Discurso Direto, Indireto e Indireto Livre.pptx
Discurso Direto, Indireto e Indireto Livre.pptxDiscurso Direto, Indireto e Indireto Livre.pptx
Discurso Direto, Indireto e Indireto Livre.pptxferreirapriscilla84
 
PROGRAMA DE AÇÃO 2024 - MARIANA DA SILVA MORAES.pdf
PROGRAMA DE AÇÃO 2024 - MARIANA DA SILVA MORAES.pdfPROGRAMA DE AÇÃO 2024 - MARIANA DA SILVA MORAES.pdf
PROGRAMA DE AÇÃO 2024 - MARIANA DA SILVA MORAES.pdfMarianaMoraesMathias
 
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
 
Rota das Ribeiras Camp, Projeto Nós Propomos!
Rota das Ribeiras Camp, Projeto Nós Propomos!Rota das Ribeiras Camp, Projeto Nós Propomos!
Rota das Ribeiras Camp, Projeto Nós Propomos!Ilda Bicacro
 
Historia da Arte europeia e não só. .pdf
Historia da Arte europeia e não só. .pdfHistoria da Arte europeia e não só. .pdf
Historia da Arte europeia e não só. .pdfEmanuel Pio
 
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
 
A QUATRO MÃOS - MARILDA CASTANHA . pdf
A QUATRO MÃOS  -  MARILDA CASTANHA . pdfA QUATRO MÃOS  -  MARILDA CASTANHA . pdf
A QUATRO MÃOS - MARILDA CASTANHA . pdfAna Lemos
 
Análise poema país de abril (Mauel alegre)
Análise poema país de abril (Mauel alegre)Análise poema país de abril (Mauel alegre)
Análise poema país de abril (Mauel alegre)ElliotFerreira
 
Ficha de trabalho com palavras- simples e complexas.pdf
Ficha de trabalho com palavras- simples e complexas.pdfFicha de trabalho com palavras- simples e complexas.pdf
Ficha de trabalho com palavras- simples e complexas.pdfFtimaMoreira35
 
Revolução russa e mexicana. Slides explicativos e atividades
Revolução russa e mexicana. Slides explicativos e atividadesRevolução russa e mexicana. Slides explicativos e atividades
Revolução russa e mexicana. Slides explicativos e atividadesFabianeMartins35
 

Kürzlich hochgeladen (20)

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
 
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
 
Slides Lição 04, Central Gospel, O Tribunal De Cristo, 1Tr24.pptx
Slides Lição 04, Central Gospel, O Tribunal De Cristo, 1Tr24.pptxSlides Lição 04, Central Gospel, O Tribunal De Cristo, 1Tr24.pptx
Slides Lição 04, Central Gospel, O Tribunal De Cristo, 1Tr24.pptx
 
INTERVENÇÃO PARÁ - Formação de Professor
INTERVENÇÃO PARÁ - Formação de ProfessorINTERVENÇÃO PARÁ - Formação de Professor
INTERVENÇÃO PARÁ - Formação de Professor
 
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
 
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
 
5 bloco 7 ano - Ensino Relogioso- Lideres Religiosos _ Passei Direto.pdf
5 bloco 7 ano - Ensino Relogioso- Lideres Religiosos _ Passei Direto.pdf5 bloco 7 ano - Ensino Relogioso- Lideres Religiosos _ Passei Direto.pdf
5 bloco 7 ano - Ensino Relogioso- Lideres Religiosos _ Passei Direto.pdf
 
PROVA - ESTUDO CONTEMPORÂNEO E TRANSVERSAL: LEITURA DE IMAGENS, GRÁFICOS E MA...
PROVA - ESTUDO CONTEMPORÂNEO E TRANSVERSAL: LEITURA DE IMAGENS, GRÁFICOS E MA...PROVA - ESTUDO CONTEMPORÂNEO E TRANSVERSAL: LEITURA DE IMAGENS, GRÁFICOS E MA...
PROVA - ESTUDO CONTEMPORÂNEO E TRANSVERSAL: LEITURA DE IMAGENS, GRÁFICOS E MA...
 
Bullying, sai pra lá
Bullying,  sai pra láBullying,  sai pra lá
Bullying, sai pra lá
 
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.
 
Discurso Direto, Indireto e Indireto Livre.pptx
Discurso Direto, Indireto e Indireto Livre.pptxDiscurso Direto, Indireto e Indireto Livre.pptx
Discurso Direto, Indireto e Indireto Livre.pptx
 
PROGRAMA DE AÇÃO 2024 - MARIANA DA SILVA MORAES.pdf
PROGRAMA DE AÇÃO 2024 - MARIANA DA SILVA MORAES.pdfPROGRAMA DE AÇÃO 2024 - MARIANA DA SILVA MORAES.pdf
PROGRAMA DE AÇÃO 2024 - MARIANA DA SILVA MORAES.pdf
 
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...
 
Rota das Ribeiras Camp, Projeto Nós Propomos!
Rota das Ribeiras Camp, Projeto Nós Propomos!Rota das Ribeiras Camp, Projeto Nós Propomos!
Rota das Ribeiras Camp, Projeto Nós Propomos!
 
Historia da Arte europeia e não só. .pdf
Historia da Arte europeia e não só. .pdfHistoria da Arte europeia e não só. .pdf
Historia da Arte europeia e não só. .pdf
 
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
 
A QUATRO MÃOS - MARILDA CASTANHA . pdf
A QUATRO MÃOS  -  MARILDA CASTANHA . pdfA QUATRO MÃOS  -  MARILDA CASTANHA . pdf
A QUATRO MÃOS - MARILDA CASTANHA . pdf
 
Análise poema país de abril (Mauel alegre)
Análise poema país de abril (Mauel alegre)Análise poema país de abril (Mauel alegre)
Análise poema país de abril (Mauel alegre)
 
Ficha de trabalho com palavras- simples e complexas.pdf
Ficha de trabalho com palavras- simples e complexas.pdfFicha de trabalho com palavras- simples e complexas.pdf
Ficha de trabalho com palavras- simples e complexas.pdf
 
Revolução russa e mexicana. Slides explicativos e atividades
Revolução russa e mexicana. Slides explicativos e atividadesRevolução russa e mexicana. Slides explicativos e atividades
Revolução russa e mexicana. Slides explicativos e atividades
 

Empfohlen

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
 

Empfohlen (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.