Olá, Visitante. Por favor entre ou registe-se se ainda não for membro.

Entrar com nome de utilizador, password e duração da sessão
 

Autor Tópico: Programação em Python  (Lida 8046 vezes)

Local

  • Ordem dos Especialistas
  • Hero Member
  • *****
  • Mensagens: 15944
    • Ver Perfil
Re:Programação em Python
« Responder #20 em: 2015-03-17 11:48:38 »
ontem disse-lhe que iria ensiná-la, nas férias, a mexer no gatinho e ela ficou muito contente. Vamos ver se ela continua com interesse.

E já vi que o Python é ainda muito avançado para ela. Até eu estou atrapalhado para fazer exercícios básicos. Sinto-me info-excluído...
“Our values are human rights, democracy and the rule of law, to which I see no alternative. This is why I am opposed to any ideology or any political movement that negates these values or which treads upon them once it has assumed power. In this regard there is no difference between Nazism, Fascism or Communism..”
Urmas Reinsalu

karnuss

  • Ordem dos Especialistas
  • Hero Member
  • *****
  • Mensagens: 1071
    • Ver Perfil
Re:Programação em Python
« Responder #21 em: 2015-03-19 11:12:49 »
Eu comecei um curso de python aqui, a ver se o termino antes que me esqueça do que aprendei :D

http://www.codecademy.com/pt/

joana18

  • Jr. Member
  • **
  • Mensagens: 84
    • Ver Perfil
Re:Programação em Python
« Responder #22 em: 2015-03-20 11:47:25 »
Ola'

Em minha opiniao a parte dos char e string em python e C sao as mais confusas, levam tempo a programar e perceber.

Em java e' bem mais facil existem funcoes que fazem isso tudo sem grande trabalho.

Local

  • Ordem dos Especialistas
  • Hero Member
  • *****
  • Mensagens: 15944
    • Ver Perfil
Re:Programação em Python
« Responder #23 em: 2015-03-20 13:36:04 »
Java não conheço.
O curso a seguir que estou a pensar tirar, que também é de python, é este:
https://www.coursera.org/course/interactivepython
https://www.coursera.org/course/interactivepython2

já completei a 7.ª semana e resolvi a questão, mas com um pouco de batota.

Take the following Python code that stores a string:‘
str = 'X-DSPAM-Confidence: 0.8475'
Use find and string slicing to extract the portion of the string after the colon character and then use the float function to convert the extracted string into a floating point number.

eu resolvi da seguinte forma:
Citar
count = 0
total = 0

try:
    fhand = open (fname)

except:
    print 'File cannot be opened:', fname
    exit()

for line in fhand:
    if line.startswith ('X-DSPAM-Confidence:'):
        line = line.rstrip ()
        new_line = line [19:]
        numero = float (new_line)
        count = count + 1
        total = total + numero

print 'Average spam confidence: ', total/count
Como sei que o string dos números iniciou-se no index 19, fiz essa batota, mas para usar o "find" será que deveria ser assim?
iline = line.find (':')
fline = line.find (' ',iline)
numero = data [iline+1:fline]
“Our values are human rights, democracy and the rule of law, to which I see no alternative. This is why I am opposed to any ideology or any political movement that negates these values or which treads upon them once it has assumed power. In this regard there is no difference between Nazism, Fascism or Communism..”
Urmas Reinsalu

Automek

  • Ordem dos Especialistas
  • Hero Member
  • *****
  • Mensagens: 30976
    • Ver Perfil

Counter Retail Trader

  • Visitante
Re:Programação em Python
« Responder #25 em: 2015-08-27 01:14:03 »
Eu comecei um curso de python aqui, a ver se o termino antes que me esqueça do que aprendei :D

http://www.codecademy.com/pt/


estas a gostar?  é util? é mesmo gratis?

Local

  • Ordem dos Especialistas
  • Hero Member
  • *****
  • Mensagens: 15944
    • Ver Perfil
Re: Programação em Python
« Responder #26 em: 2015-09-16 13:18:34 »
Está a começar um curso de Scrach no coursera. É o ideial para as crianças aprenderem programação.
“Our values are human rights, democracy and the rule of law, to which I see no alternative. This is why I am opposed to any ideology or any political movement that negates these values or which treads upon them once it has assumed power. In this regard there is no difference between Nazism, Fascism or Communism..”
Urmas Reinsalu

JoaoAP

  • Ordem dos Especialistas
  • Hero Member
  • *****
  • Mensagens: 4778
    • Ver Perfil
Re: Programação em Python
« Responder #27 em: 2016-01-13 14:19:16 »
Em 2015 o Python subiu bastante!
E o Java em 1.º lugar! Subiu!
Outros dão o Python em 2.º

java
C
C++
Python
C#
php
...

Já agora, em termos de Escolas, nos EUA, estas preferem o Python para ensinarem, seguido do java. Não sabia.
Citar
Of course, schools have different needs than real-world employers. Schools often prefer to start students out with a high-level, easy-to-read language like Python. That’s especially true for intro-to-programming courses designed for students not majoring in CS, to make it easier to teach the concepts behind programming. A better indication of what actual development shops are looking for might be the skills mentioned on developer-oriented job boards like Dice.com. According to Dice’s July, 2014 data, Java (including Java Platform Enterprise Edition, Oracle’s extended version) and various flavors of C (including C++ and C#) are out in front by a large margin, with 17,393 and 16,172 job postings asking for those skills this month. JavaScript, .NET, HTML, and XML round out the top five. Python comes in eighth, with 5,142 requests.
« Última modificação: 2016-01-13 14:27:10 por JoaoAP »

Counter Retail Trader

  • Visitante
Re: Programação em Python
« Responder #28 em: 2016-07-06 19:28:45 »