Roksas 846 Postado Agosto 19, 2013 Share Postado Agosto 19, 2013 Eaai galerinha da comuniDade hehe. Neste tópico vou postar as notas e suas respostas dos exercícios da aula 4. Vamos lá: Allan Harlen: ----------------------------- 1 tarefa -------------------- --- Nessa Tarefa Eu Usei If , Or , Else if 5 >= 4 or 9 <= 7 then print("5 e maior ou = a 4 e 9 e maior ou = a 7") else print("4 e menor ou = a 5 e 7 e menor ou = a 9") end -- Resultado : 5 e maior ou = a 4 e 9 e maior ou = a 7 ---------------------------- 2 Tarefa -------------------- if not 9 == 9 then print("9 e = a 9") else print("9 nao e = a 9") end -- Resultado : 9 nao e = a 9 --------------------------- 3 Tarefa ----------------------- if 1800 > 1900 == false then print("1800 nao e maior que 1900") elseif 1900 < 1800 == true then print("1900 e maior que 1800") end -- Resultado : 1800 nao e maior que 1900 Nota: 9,00 OBS: Muito bom cara, só se confundiu na lógica das msgs de alguns prints, exemplo no exercício 2. Matheus Ribeiro: if 30>10 then --correto print ("correto") end if 30>10 and 40<3 then --incorreto print ("correto") else print ("incorreto") end if (2*2+2)%4==3 or (2*2+2)%4==3==true then --incorreto print ("correto") else print ("Incorreto") end if 2^3>8 then -- :´( print ("correto") elseif 2^3==7 then print ("incorreto") else print ("2^3==8 seu nb") end local Eu = 1000 local Scripter = 2000 local algunsdias =1000 if Eu+algunsdias==Scripter then print ("Sim") end if math.random(5, 9)<10 then print ("Correto") end if string.len(9999)>2^3%3 then print ("Correto") else end Nota: 8,00 OBS: Belos exercícios, só se confundiu em algumas bibliotecas, rsrs. Pablo Rodrigues: 1º Checagem a = 1 b = 2 c = 3 if b > a and c > b then print ("Isso, isso, isso") elseif a < b and b < c then print ("Never") elseif a ~= b and b ~= c then print ("são diferentes!") else print ("Error") end 2ºChecagem local pablo = 1000 local burro = 0 if pablo > burro then print ("Pablo é um genio") elseif pablo < burro then print ("pablo é burro") end 3º checagem if 3 < 4 or 3~=4 then print ("tres é maior que quatro ou tres é diferente de quatro") elseif 4>3 or 3==4 then print ("error") end Nota: 10,00 OBS: Parabéns por usar variáveis. Daniel Angel: if 201 < 303 then print ("!Correto") end Com else if 201 < 303 then print ("!Correto") else print ("201 > 303") end com else if if 201 < 303 then print ("!Correto") elseif 201 > 303 then print ("201 nao é maior que 303 e sim igual") end 2 estrutura if 200 > 194 then print ("Correto") end com else if 200 > 194 then print ("Correto") else print (200 < 194) end com elseif if 200 > 194 then print ("Correto") elseif 200 < 194 then print (200 > 194) end 3 estrutura if 233 == 233 then print ("Correto") end com else if 233 == 233 then print ("Correto") else print ("233 ~= 233) end com elseif if 233 == 233 then print ("Correto") else print ("233 ~= 233") end Nota: 9,00 OBS: Simples exemplos, mas, muito bons. MaThEuS RiBeiRo: local x = 5 local y = 10 if x > y then print(x..' é maior que '..y) elseif x == y then print(x..' é igual a '..y) elseif x < y then print(x..' é menor que '..y) else print(x..' Não é maior, Não é menor e também não é igual a '..y..' e também essa mensagem nunca irá aparecer') end Nota: 8,00 OBS: Apenas um exercício, mas bem completo. Até usou concatenação, rsrs. Kluivert: if 12 == 13 then print("Certo!!! o.O") end if 12 == 13 then print("Certo!!! o.O") else print("Errado !!!") end if 12 == 13 then print("12 é igual a 13) elseif 12 == 14 then print("12 não é igual ao numero 13, e sim 12 e igual ao numero 14") end Nota: 8,00 OBS: Bem correto, mas procure entender mais a lógica. Thiago Carvalho: if 5 > 2 then print ("5 é maior que 2") else print ("5 é igual a 2) end if 10 + 15 == 25 then print ("Correto") ifelse 10 + 15 ~= 25 then print ("Errado") end if 5 * 5 == 25 then print ("5 * 5 é igual a 25") ifelse 5 * 5 ~= 25 then print ("5 * 5 é diferente de 25") end Nota: 9,00 OBS: Bem legal, usando operadores, mas ifelse não existe kkk. É isso galerinha, se preparem para a próxima aula, e terá prova hein, ;D Link para o comentário https://xtibia.com/forum/topic/219710-exerc%C3%ADcios-aula-4-respostas/ Compartilhar em outros sites More sharing options...
kttallan 319 Postado Agosto 19, 2013 Share Postado Agosto 19, 2013 xD veio merecia 1,0 entreguei em 10 minutos hehehe xD manow nova aula Link para o comentário https://xtibia.com/forum/topic/219710-exerc%C3%ADcios-aula-4-respostas/#findComment-1552290 Compartilhar em outros sites More sharing options...
infernity 9 Postado Agosto 19, 2013 Share Postado Agosto 19, 2013 (editado) Owwwwwwwwwwwwwow 10 *u* ?! Obrigado Roksas, com essa nota meu empenho vai melhorar em 100000%, Que venham as proximas aulas!!! Editado Agosto 19, 2013 por infernity Link para o comentário https://xtibia.com/forum/topic/219710-exerc%C3%ADcios-aula-4-respostas/#findComment-1552293 Compartilhar em outros sites More sharing options...
ThatsRockBitch 0 Postado Agosto 19, 2013 Share Postado Agosto 19, 2013 Só queria saber que bibliotecas eu me confundi? e obrigado por corrigir o meu exercício ;P Link para o comentário https://xtibia.com/forum/topic/219710-exerc%C3%ADcios-aula-4-respostas/#findComment-1552311 Compartilhar em outros sites More sharing options...
Kluivert 142 Postado Agosto 21, 2013 Share Postado Agosto 21, 2013 Vo tentar melhorar mas e mais ashashsa !!!! Link para o comentário https://xtibia.com/forum/topic/219710-exerc%C3%ADcios-aula-4-respostas/#findComment-1552775 Compartilhar em outros sites More sharing options...
Posts Recomendados