Python (Lugha ya programu)

Kutoka Wikipedia, kamusi elezo huru
Jump to navigation Jump to search
Python
Python-logo-notext
Shina la studio namna : namna ya utaratibu

inaozingatiwa kuhusu kipengee

namna nyingi

Imeanzishwa Februari 20 1991 (1991-02-20) (umri 29)
Mwanzilishi Guido van Rossum
Ilivyo sasa Ilivutwa na: ABC, Ada, ALGOL 68, APL, C, C++, CLU, Dylan, Haskell, Icon, Java, Lisp, Modula-3, Perl, Standard ML

Ilivuta: Apache Groovy, Boo, Cobra, CoffeeScript, D, F#, Genie, Go, JavaScript, Julia, Nim, Ring, Ruby, Swift

Mahala Python Software Foundation License
Tovuti https://www.python.org

Python ni lugha ya programu ambayo iliundwa na Guido van Rossum na ilianzishwa tarehe 20 Februari 1991. Leo tunatumia Python 3.0.

Historia[hariri | hariri chanzo]

Ilianzishwa 20 Februari 1991 nchini Marekani. Lakini Guido Van Rossum alianza kufanya kazi pekee yangu kuhusu Python mwaka wa 1988.

Falsafa[hariri | hariri chanzo]

Namna ya Python ni namna ya utaratibu na inaozingatiwa kuhusu kipengee kinyume cha lugha za programu nyingi.

Sintaksia[hariri | hariri chanzo]

Sintaksia ya Python ni rahisi sana kinyume cha lugha za programu nyingine kama Java, C sharp au C++. Python Ilivutwa na sintaksia ya Ada, lugha ya programu nyingine.

Mfano wa programu ya Python[hariri | hariri chanzo]

Programu kwa kuchapa "Jambo ulimwengu !".

print('Jambo ulimwengu !')

Programu kwa kuhesabu factoria ya nambari moja.

n = int(input('Andika nambari moja, kisha factoria yake itachapwa : '))

if n < 0:
    raise ValueError('Lazima andika nambari hasi')

fact = 1
i = 2
while i <= n:
    fact = fact * i
    i += 1

print(fact)

Marejeo[hariri | hariri chanzo]

  • Downey, Allen B. (May 2012). Think Python: How to Think Like a Computer Scientist (Version 1.6.6 ed.). ISBN 978-0-521-72596-5.
  • Hamilton, Naomi (5 August 2008). "The A-Z of Programming Languages: Python". Computerworld. Archived from the original on 29 December 2008. Retrieved 31 March 2010.
  • Lutz, Mark (2013). Learning Python (5th ed.). O'Reilly Media. ISBN 978-0-596-15806-4.
  • Pilgrim, Mark (2004). Dive Into Python. Apress. ISBN 978-1-59059-356-1.
  • Pilgrim, Mark (2009). Dive Into Python 3. Apress. ISBN 978-1-4302-2415-0.
  • Summerfield, Mark (2009). Programming in Python 3 (2nd ed.). Addison-Wesley Professional. ISBN 978-0-321-68056-3.