Linha 25: Linha 25:
** Ambiente interativo
** Ambiente interativo
** Licença de código aberto, compatível com a GPL  
** Licença de código aberto, compatível com a GPL  
<br>
* Por que Python?
** Simples, Legível, Clara e Elegante
* Escrever um simples “nome, Seja bem vindo(a)”
Java
public class Hello{
public static void main(String args[]) {
java.util.Scanner s = new java.util.Scanner(System.in);
System.out.print("Digite seu nome:");
String nome = s.nextLine();
System.out.println("\n" + nome + ", Seja bem vindo(a) :)\n");
  }
<br>
* Por que Python?
** Simples, Legível, Clara e Elegante
* Escrever um simples “nome, Seja bem vindo(a)”
C
#include <stdio.h>
int main(){
char nome[200];
printf("Digite seu nome: ");
scanf("%s", nome);
printf("\n %s, Seja bem vindo(a)\n", nome);
return 0;
}
<br>
* Por que Python?
** Simples, Legível, Clara e Elegante
* Escrever um simples “nome, Seja bem vindo(a)”
Python
nome = raw_input('Digite seu nome: ')
print ("\n%s, Seja bem vindo(a) :)\n" % nome)
<br>
<br>



Edição das 21h33min de 1 de janeiro de 2016

Página oficial


https://www.python.org/

  • Python é uma linguagem de programação criada por Guido van Rossum (https://www.python.org/~guido/) em 1991. Os objetivos do projeto da linguagem eram: produtividade e legibilidade. Em outras palavras, Python é uma linguagem que foi criada para produzir código bom e fácil de manter de maneira rápida.



  • História
    • Guido van Rossum
    • Universidade de Amsterdã - 1982
    • 2005 - 2012 – Google
    • 2013 – Dropbox
    • Iniciou a implementação em Dezembro de 1989
    • Python 2.0 – em 2000
    • Python 3.0 – em 2008
    • Versão 2.7.5 e 3.3.2
    • Versão 3.4
    • É Python! E não Phyton, Pyton, Phython, ...
    • Linguagem de Altíssimo Nível (VHLL)
    • Ambiente interativo
    • Licença de código aberto, compatível com a GPL


  • Por que Python?
    • Simples, Legível, Clara e Elegante
  • Escrever um simples “nome, Seja bem vindo(a)”
Java 
public class Hello{
public static void main(String args[]) {
java.util.Scanner s = new java.util.Scanner(System.in);
System.out.print("Digite seu nome:");
String nome = s.nextLine();
System.out.println("\n" + nome + ", Seja bem vindo(a) :)\n");
 }
}  


  • Por que Python?
    • Simples, Legível, Clara e Elegante
  • Escrever um simples “nome, Seja bem vindo(a)”
C
#include <stdio.h>
int main(){
char nome[200];
printf("Digite seu nome: ");
scanf("%s", nome);
printf("\n %s, Seja bem vindo(a)\n", nome);
return 0;
} 


  • Por que Python?
    • Simples, Legível, Clara e Elegante
  • Escrever um simples “nome, Seja bem vindo(a)”
Python
nome = raw_input('Digite seu nome: ')
print ("\n%s, Seja bem vindo(a) :)\n" % nome)


Instale última versão do Python


  • python.org


Usando o terminal


[lclaudio@lntb-031781 ~]$ python
Python 2.7.8 (default, Apr 15 2015, 09:26:43) 
[GCC 4.9.2 20150212 (Red Hat 4.9.2-6)] on linux2
Type "help", "copyright", "credits" or "license" for more information. 
>>> 


  • Podemos utilizá-lo diretamente para executar alguns comandos:
>>> 2 + 2
4
>>> 4 + 4
8
>>> 12 * 2
24
>>> 35 - 21
14
>>> 40 - 65
-25
>>> 12 / 3
4


  • Evoluindo nas operações:
>>> 12 / 30
 0
 >>> ??