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

#1 2010-12-31 11:58:31

poopo
Scratcher
Registered: 2009-09-20
Posts: 1000+

epic bouncey

Yes I have made a new python code. smile
This time it is a 0 that bounces on imaginary walls.  Please understand I'm a complete beginner so don't expect it to be good or anything.  here it tis:

Code:

import pippy
bx = 5
by = 3
xc = 1
yc = 1
i = 1
bp = 0
while 0 == 0:
    pippy.console.clear()
    i = 1    
    while i < by:
        print " "
        i = i + 1
    i = 1
    bp = "0"
    while i < bx:
        bp = " " + bp
        i = i + 1
    print bp
    bx = bx + xc
    by = by + yc
    if bx == 10:
        xc = xc * -1
    if bx == 1:
        xc = xc * -1
    if by == 1:
        yc = yc * -1
    if by == 5:
        yc = yc * -1 
    pippy.wait()

try it.   smile
It may not work as i use something called pippy it is the same as python but has a different name so the importation may not work. tongue


http://i45.tinypic.com/28rnqki.jpg

Offline

 

#2 2010-12-31 11:59:40

MasterOfDeception
Scratcher
Registered: 2009-12-29
Posts: 100+

Re: epic bouncey

Is this 3.x or 2.x?


"My Language Arts teacher beat Chuck Norris up." -12three

Offline

 

#3 2010-12-31 12:13:00

poopo
Scratcher
Registered: 2009-09-20
Posts: 1000+

Re: epic bouncey

What do you mean?


http://i45.tinypic.com/28rnqki.jpg

Offline

 

#4 2010-12-31 12:24:36

MasterOfDeception
Scratcher
Registered: 2009-12-29
Posts: 100+

Re: epic bouncey

What version of python is it?


"My Language Arts teacher beat Chuck Norris up." -12three

Offline

 

#5 2010-12-31 12:26:39

poopo
Scratcher
Registered: 2009-09-20
Posts: 1000+

Re: epic bouncey

MasterOfDeception wrote:

What version of python is it?

Idk maybe 2


http://i45.tinypic.com/28rnqki.jpg

Offline

 

Board footer