This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-11-26 07:37:11

Ideas
Scratcher
Registered: 2012-10-07
Posts: 100+

Python help

I need help with python 3.
Any relevent example on coding would be great.
If this needs to be closed then can you wait for at least 1 response


http://img685.imageshack.us/img685/2010/screenshot20121110at132.pngI think that you must CLICK above

Offline

 

#2 2012-11-26 16:06:26

TheSupremeOverLord
Scratcher
Registered: 2012-09-29
Posts: 100+

Re: Python help

Okay, i am pretty fluent with python, and a few other languages.  Can you be a little bit more specific in what kind of help?


http://i1154.photobucket.com/albums/p522/lizzyhipo/MINIPIG.jpg

Offline

 

#3 2012-11-27 07:17:10

Ideas
Scratcher
Registered: 2012-10-07
Posts: 100+

Re: Python help

The basics and where to start


http://img685.imageshack.us/img685/2010/screenshot20121110at132.pngI think that you must CLICK above

Offline

 

#4 2012-11-27 08:55:46

TheSupremeOverLord
Scratcher
Registered: 2012-09-29
Posts: 100+

Re: Python help

Ideas wrote:

The basics and where to start

Okay, can we start tonight?


http://i1154.photobucket.com/albums/p522/lizzyhipo/MINIPIG.jpg

Offline

 

#5 2012-11-27 15:50:13

Ideas
Scratcher
Registered: 2012-10-07
Posts: 100+

Re: Python help

I guess if there is no time difference


http://img685.imageshack.us/img685/2010/screenshot20121110at132.pngI think that you must CLICK above

Offline

 

#6 2012-11-29 07:16:30

Ideas
Scratcher
Registered: 2012-10-07
Posts: 100+

Re: Python help

When can we start?


http://img685.imageshack.us/img685/2010/screenshot20121110at132.pngI think that you must CLICK above

Offline

 

#7 2012-12-01 17:41:44

TheSupremeOverLord
Scratcher
Registered: 2012-09-29
Posts: 100+

Re: Python help

I will do this in parts

Launching and Creating Python programs

Python can be programmed via the interactive command line (aka the interpreter or IDE) but anything you code won't be saved. Once you close the session it all goes away. To save your program, it's easiest to just type it in a text file and save it in the foo.py format.

To use the interpreter, type python at the command prompt (*nix and Mac) or launch the Python IDE (Windows and Mac). Here are two versions of what you should see (the first is an example from the bash shell, the second example is from the MacPython IDE):

Generic Code Example:
cpe-70-95-108-53:~ codyjackson$ python
Python 2.3 (#1, Sep 13 2003, 00:49:11)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
Generic Code Example:
Python 2.3 (#1, Sep 13 2003, 00:49:11)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1495)]
Type "copyright", "credits" or "license" for more information.
MacPython IDE 1.0.1
>>>
The >>> is the Python command prompt; your code is typed here and the result is printed on the following line, without a prompt. For example:

Generic Code Example:
>>>print "Hello World!"
Hello World!
>>>spam = "yum"
>>>
By the way, Python was named after Monty Python, not the snake. Hence, much of the code you'll find on the 'net, tutorials, and books will have references to Monty Python sketches.

If you want to run a Python program, simply type python at the shell command prompt (not the IDE) followed by the program name.

Generic Code Example:
$python foo.py
Files saved with the .py extension are called modules and can be called individually at the command line or within a program like header files. More information on working with modules can be found in the Python documentation.

That's it for Part 1. I know it's not much but in the next installment I'll start talking about the types and operators available in Python.

Briefly, Python has the same implementations that C does, except that the largest types are used (such as double floats and long integers) and several new features are added to make programming easier, like lists and dictionaries.


http://i1154.photobucket.com/albums/p522/lizzyhipo/MINIPIG.jpg

Offline

 

#8 2012-12-02 06:43:51

Ideas
Scratcher
Registered: 2012-10-07
Posts: 100+

Re: Python help

Ok...


http://img685.imageshack.us/img685/2010/screenshot20121110at132.pngI think that you must CLICK above

Offline

 

#9 2012-12-02 13:51:26

Ideas
Scratcher
Registered: 2012-10-07
Posts: 100+

Re: Python help

That print thing doesn't work


http://img685.imageshack.us/img685/2010/screenshot20121110at132.pngI think that you must CLICK above

Offline

 

#10 2012-12-03 13:13:30

Ideas
Scratcher
Registered: 2012-10-07
Posts: 100+

Re: Python help

What are double floats and things of that nature?


http://img685.imageshack.us/img685/2010/screenshot20121110at132.pngI think that you must CLICK above

Offline

 

Board footer