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

#1 2011-01-16 16:00:43

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

Cool code

Here is a cool  code I made in python:

Code:

word = raw_input("Input your word and watch it bounce around the screen: ")
import pippy
wx = 5
wy = 5
wcx = -1
wcy = 1
while 0 == 0:
    pippy.console.clear()
    i = 0
    pl = word
    while i < wx:
        pl = " " + pl
        i = i + 1  
    i = 0
    while i < wy:
        print " "
        i = i + 1
    print pl
    wx = wx + wcx
    wy = wy + wcy
    if wx == 1 or wx == 20:
        wcx = wcx * -1
    if wy == 1 or wy == 10:
        wcy = wcy * -1
    pippy.wait()

o o
Do you like it? It makes a word you input bounce around onthe screen.      ̆


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

Offline

 

#2 2011-01-16 16:57:27

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

Re: Cool code

cool

Offline

 

#3 2011-01-16 20:43:38

scmb1
Scratch Team
Registered: 2009-03-19
Posts: 1000+

Re: Cool code

Is that Python 2 or 3?


http://i48.tinypic.com/2z5pqad.png

Offline

 

#4 2011-01-16 22:40:01

ScratchReallyROCKS
Scratcher
Registered: 2009-04-22
Posts: 1000+

Re: Cool code

um...

Traceback (most recent call last):
  File "<insert directory here>", line 2, in <module>
    import pippy
ImportError: No module named pippy


http://imageshack.us/a/img694/3806/sigmad.png

Offline

 

#5 2011-01-17 12:46:12

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

Re: Cool code

ScratchReallyROCKS wrote:

um...

Traceback (most recent call last):
  File "<insert directory here>", line 2, in <module>
    import pippy
ImportError: No module named pippy

Yes I know I use something called pippy on a differant computor try replacing the pippy with python.  wink


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

Offline

 

#6 2011-01-17 12:47:12

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

Re: Cool code

scmb1 wrote:

Is that Python 2 or 3?

Dk


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

Offline

 

#7 2011-01-17 16:45:17

msdosdude
Scratcher
Registered: 2009-06-11
Posts: 1000+

Re: Cool code

poopo wrote:

Here is a cool  code I made in python:

Code:

word = raw_input("Input your word and watch it bounce around the screen: ")
import pippy
wx = 5
wy = 5
wcx = -1
wcy = 1
while 0 == 0:
    pippy.console.clear()
    i = 0
    pl = word
    while i < wx:
        pl = " " + pl
        i = i + 1  
    i = 0
    while i < wy:
        print " "
        i = i + 1
    print pl
    wx = wx + wcx
    wy = wy + wcy
    if wx == 1 or wx == 20:
        wcx = wcx * -1
    if wy == 1 or wy == 10:
        wcy = wcy * -1
    pippy.wait()

o o
Do you like it? It makes a word you input bounce around onthe screen.      ̆

Since you used Pippy, do you have an XO Laptop?


http://i39.tinypic.com/2vkxppf.png
Freebie. Not a Scratch OS, a REAL OS you can boot to, by msdosdude.

Offline

 

#8 2011-01-17 16:58:15

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

Re: Cool code

msdosdude wrote:

poopo wrote:

Here is a cool  code I made in python:

Code:

word = raw_input("Input your word and watch it bounce around the screen: ")
import pippy
wx = 5
wy = 5
wcx = -1
wcy = 1
while 0 == 0:
    pippy.console.clear()
    i = 0
    pl = word
    while i < wx:
        pl = " " + pl
        i = i + 1  
    i = 0
    while i < wy:
        print " "
        i = i + 1
    print pl
    wx = wx + wcx
    wy = wy + wcy
    if wx == 1 or wx == 20:
        wcx = wcx * -1
    if wy == 1 or wy == 10:
        wcy = wcy * -1
    pippy.wait()

o o
Do you like it? It makes a word you input bounce around onthe screen.      ̆

Since you used Pippy, do you have an XO Laptop?

Yes.  big_smile  I didn't win the challenge but my aunt knows the guy who made them.  smile  It's autographed by him too.


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

Offline

 

#9 2011-01-17 17:00:16

msdosdude
Scratcher
Registered: 2009-06-11
Posts: 1000+

Re: Cool code

poopo wrote:

msdosdude wrote:

poopo wrote:

Here is a cool  code I made in python:

Code:

word = raw_input("Input your word and watch it bounce around the screen: ")
import pippy
wx = 5
wy = 5
wcx = -1
wcy = 1
while 0 == 0:
    pippy.console.clear()
    i = 0
    pl = word
    while i < wx:
        pl = " " + pl
        i = i + 1  
    i = 0
    while i < wy:
        print " "
        i = i + 1
    print pl
    wx = wx + wcx
    wy = wy + wcy
    if wx == 1 or wx == 20:
        wcx = wcx * -1
    if wy == 1 or wy == 10:
        wcy = wcy * -1
    pippy.wait()

o o
Do you like it? It makes a word you input bounce around onthe screen.      ̆

Since you used Pippy, do you have an XO Laptop?

Yes.  big_smile  I didn't win the challenge but my aunt knows the guy who made them.  smile  It's autographed by him too.

OMG! I have a G1G1. Its so awesome. I remember having Fedora on it with Gnome and Sugar.


http://i39.tinypic.com/2vkxppf.png
Freebie. Not a Scratch OS, a REAL OS you can boot to, by msdosdude.

Offline

 

#10 2011-01-17 17:06:28

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

Re: Cool code

msdosdude wrote:

poopo wrote:

msdosdude wrote:


Since you used Pippy, do you have an XO Laptop?

Yes.  big_smile  I didn't win the challenge but my aunt knows the guy who made them.  smile  It's autographed by him too.

OMG! I have a G1G1. Its so awesome. I remember having Fedora on it with Gnome and Sugar.

Cool! They are fun aren't they. A little limited but fun. smile


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

Offline

 

Board footer