answersLogoWhite

0

Python Programming

Python was first released in 1991, it is an high-level programming language. It was created by Python Software Foundation. The language is influenced by a number of programming language such as C, Lisp, Perl, Java and others.

155 Questions

How do you write a program that prompts the user to enter a short message and the number of times it is to be displayed and then displays the message the required number of times in Python?

Sorry, I'm not doing your homework for you.

I suggest you flowchart the problem, execute it yourself by hand on the flowchart a few times to make sure it works, then convert the flowchart to code in whatever language the teacher told you to use.

That's what I did back in 1973 with my program to play tic-tac-toe, that I had to punch on cards using the FORTRAN II programming language when I first started on computers. Hand execution of a program though tedious and boring is a very effective means to find bugs and gain insight to the way computers operate.

What type of software is python?

  • Bazaar, a free distributed revision control system
  • BitTorrent original client, along with several derivatives
  • BuildBot, a continuous integration system
  • Chandler, a personal information manager including calendar, email, tasks and notes support that is currently under development
  • Decibel Audio Player, an open source audio player
  • Deluge, a bittorrent client for GNOME
  • Emesene, an msn/wlm substitute
  • Exaile, an open source audio player
  • Gajim, an instant messaging client for the XMPP protocol
  • GMapCatcher, an open source offline maps viewer
  • GRAMPS, an open source genealogy software
  • Juice, a popular podcast downloader
  • Listen, an open source media player
  • Mercurial a cross-platform, distributed source management tool
  • Morpheus, file-sharing client/server software operated by the company StreamCast
  • MusicBrainz Picard, a cross-platform MusicBrainz tag editor
  • Nicotine, a PyGTK SoulSeek client.
  • Pitivi a video editor
  • Portage, the heart of Gentoo Linux. An advanced package management system based on the BSD-style ports system
  • Quake Army Knife, an environment for developing 3D maps for games based on the Quake engine
  • Resolver One, a spreadsheet
  • SAGE (sagemath) combines more than 20 main opensource math packages and provides easy to use web interface with the help of python
  • SCons, a tool for building software
  • Yum, a package management utility for RPM-compatible Linux operating systems.
  • Phenny, an IRC bot.
  • Calibre, an ebooks management software.

Who created the Python programming language?

#LMGTFY

Guido van Rossum, a Dutch computer programmer is the author of the programming language Python. Among Python programmers and the Python community, van Rossum us known as the "Benevolent Dictator For Life" (BDFL).

What is python 2.5.1?

Python is a scripting language. Which you can use to make games, gui apps, text based apps or anything you want. Python comes "with batteries included" which means that the standard library contains a lot, for many different things.

Any good teaching sites for Python?

Codecademy offers a python course which works pretty well. That's how I learned!

The Official Python Tutorial

*Maybe* you could start there?

Python for non-programmers is a LIST OF TUTORIALS

Invent Your Own Computer Games With Python

I used it a lot, even though it's called '... computer games ...' it teaches you a lot of the basics in a fun, simple way.

Sthurlow is a great beginners tutorial too.

Help:

StackOverflow is for programming related questions

The official Python IRC channel is very good

I would add websites like

Udemy

Coursera are very good.

Also you can rely on tutorials by

Tutorialspoint where you get answered for all your queries.

Are applescript and python the same?

There both programming languages if that's what you mean but they're different in how they are implemented. Python is a general-purpose language compatible with almost any OS but Applescript is designed for Macintosh and apple products.

Do python identifiers have to start with a letter or underscore?

Yes, that's the rule in Python (and in many other programming languages, as well).

How do you import random in python 3.2?

import random

random.randrange(1, 99999) #Set range from 1 to 99999

Where can one obtain a Python list?

Python lists can't be downloaded from an adress or website source. They have to be created in the Python programming language. Lists can then be created by using a text editor.

How can you create infinite instances of the same class using Python?

try using a never ending looping statement

(I know that I need a while/for loop, but I don't know how to assign variables to a randomly generated string)

What is the meaning of print and input in idle python?

"print" will output a value onto the screen for a user to see.

"input" or "raw_input" gets a user's input.

Example of semantic errors?

scores = [51, 47, 53, 97, 27]

summation = 0.0

for score in scores:

summation *= score # Semantic Error.

average = summation / len(scores)

print average # Isn't average. average == 0

Does Python allow programmers to break a statement into multiple lines?

Apparently it does. From an online style guide:

"The preferred way of wrapping long lines is by using Python's implied line continuation inside parentheses, brackets and braces. Long lines can be broken over multiple lines by wrapping expressions in parentheses. These should be used in preference to using a backslash for line continuation. Make sure to indent the continued line appropriately. The preferred place to break around a binary operator is after the operator, not before it. "

Source: http://www.python.org/dev/peps/pep-0008/#maximum-line-length

What is floor division in Python?

Floor division is division where the answer is rounded down. For example, 5/2 in floor division is not 2.5, but 2. In Python 2, floor division is the default. In Python 3, the floor division operator is //.

Python 2:

>>> 5/2

2

>>> 5.0/2

2.5

Python 3:

>>> 5/2

2.5

>>> 5//2

2

Which python expression finds the value?

It depends... "if" will check to see if a value is equal to something; but there are operators such as "+", "*", "-", "/", etc.

How do you define Y as 1 and N as 0 in Python?

I suspect that you mean that you want to define constants, which is not possible in Python. Any variable can be rebound to something else at any time.