Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: Python 100 line Challenge
Post: RE: Python 100 line Challenge
(May-29-2022, 06:06 PM)Coricoco_fr Wrote: Hello,
This is not well written tkinter code. With tkinter you use a callback (use after()) to loop...
I see other clumsinesses...
I actually developed thi... |
|
codingCat |
Code sharing |
9 |
3,389 |
Jun-01-2022, 02:04 PM |
|
|
Thread: Python 100 line Challenge
Post: RE: Python 100 line Challenge
(May-28-2022, 09:56 PM)Larz60+ Wrote: You might like this: https://python-forum.io/thread-37300-pos...#pid157645
I have recently seen this... its a great video. I love gravity simulators. It hadn't ... |
|
codingCat |
Code sharing |
9 |
3,389 |
May-29-2022, 12:02 AM |
|
|
Thread: Python 100 line Challenge
Post: RE: Python 100 line Challenge
Another offering. This one is a little reflex game. Again, showing how expanding the challenge to 100 lines provides a lot more flexibility using GUI objects while keeping the code easy to follow.
... |
|
codingCat |
Code sharing |
9 |
3,389 |
May-28-2022, 07:09 PM |
|
|
Thread: Python 100 line Challenge
Post: RE: Python 100 line Challenge
Here is a first offering. Something I have dubbed a chaos spinner. Credit for the trig needed to rotate the spinners goes to its original author. My contribution was randomization and having it reset... |
|
codingCat |
Code sharing |
9 |
3,389 |
May-27-2022, 02:19 PM |
|
|
Thread: Python 100 line Challenge
Post: Python 100 line Challenge
The goal of the 25 line challenge was to see how much could be squished into a very minimal space. It was amazing to see how low people could go. I was particularly impressed with menator01's managin... |
|
codingCat |
Code sharing |
9 |
3,389 |
May-27-2022, 02:14 PM |
|
|
Thread: Python 25 Line Challenge
Post: RE: Python 25 Line Challenge
This one is just a little artwork using the turtle, although the idea of double spiral goes back to one of my first Turtle programs. Looking at the results... tkinter and turtle would benefit from som... |
|
codingCat |
Code sharing |
34 |
8,340 |
May-18-2022, 07:17 PM |
|
|
Thread: Python 25 Line Challenge
Post: RE: Python 25 Line Challenge
Mini space invaders
This one went a little long. The main issues is that, leaning into dictionaries, the readability went in the opposite direction as expected and I lost the will to kibitz. **tongu... |
|
codingCat |
Code sharing |
34 |
8,340 |
May-17-2022, 06:24 PM |
|
|
Thread: Python 25 Line Challenge
Post: RE: Python 25 Line Challenge
This is another classic. From the pages of Creative Computing, and the book I taught myself programming with, Games in BASIC, I present: Sine Wave:
#From the pages of Creative Computing, converted fr... |
|
codingCat |
Code sharing |
34 |
8,340 |
May-17-2022, 01:50 PM |
|
|
Thread: Python 25 Line Challenge
Post: RE: Python 25 Line Challenge
I'm still looking forward to others contributing to the thread. Until that moment, here is another interpretation of an original entry into that contest. A sub hunt game in 24 lines. I think the nex... |
|
codingCat |
Code sharing |
34 |
8,340 |
May-13-2022, 07:00 PM |
|
|
Thread: Python 25 Line Challenge
Post: RE: Python 25 Line Challenge
To keep the ball rolling, here is my Python interpretation of one of the three programs that got this ball rolling so many years ago. Can anyone get it down to a single line?
import turtle,random
t... |
|
codingCat |
Code sharing |
34 |
8,340 |
May-12-2022, 07:10 PM |
|
|
Thread: Python 25 Line Challenge
Post: RE: Python 25 Line Challenge
(May-11-2022, 05:51 AM)Gribouillis Wrote: (May-10-2022, 01:43 PM)codingCat Wrote: The fact that you have have an assignment operator that returns a value is insane.The walrus operator := appeared ... |
|
codingCat |
Code sharing |
34 |
8,340 |
May-11-2022, 11:33 AM |
|
|
Thread: Python 25 Line Challenge
Post: RE: Python 25 Line Challenge
Here is my next submission, one of my favorite demos... bouncing balls. from 150 lines, I managed to drop it down to 30 with the help a dictionary rather than multiple lists. I could get the last five... |
|
codingCat |
Code sharing |
34 |
8,340 |
May-10-2022, 02:55 PM |
|
|
Thread: Python 25 Line Challenge
Post: RE: Python 25 Line Challenge
(May-09-2022, 07:07 PM)Gribouillis Wrote: # Set a variable for accessing turtle objects
while turtles[i].xcor() < 200:
turtles[i := (i + 1) % len(turtles)].forward(randint(0, 5))As a teacher,... |
|
codingCat |
Code sharing |
34 |
8,340 |
May-10-2022, 01:43 PM |
|
|
Thread: Python 25 Line Challenge
Post: RE: Python 25 Line Challenge
(May-09-2022, 06:04 PM)menator01 Wrote: If you remove comments and spacing, got it to 31 lines.
hideturtle(), speed('fastest')
penup(), goto(-200, 10*30/2), pendown(), goto(-200, 0-270)
penup(), got... |
|
codingCat |
Code sharing |
34 |
8,340 |
May-09-2022, 06:33 PM |
|
|
Thread: Python 25 Line Challenge
Post: RE: Python 25 Line Challenge
(May-09-2022, 01:11 PM)Coricoco_fr Wrote: from random import randint
for cnt in range(1, 81):
print("/" if randint(0,1) == 0 else "\\", end="" if cnt != 80 else "\n") ... |
|
codingCat |
Code sharing |
34 |
8,340 |
May-09-2022, 02:27 PM |
|
|
Thread: Python 25 Line Challenge
Post: RE: Python 25 Line Challenge
And here is another offering of my own -- I took the random maze idea from youTube's 8-bit guy and combined it with a random maze idea of my own. I had to do a little research as I've never had a reas... |
|
codingCat |
Code sharing |
34 |
8,340 |
May-09-2022, 12:17 PM |
|
|
Thread: Python 25 Line Challenge
Post: RE: Python 25 Line Challenge
(May-06-2022, 07:33 PM)menator01 Wrote: One more.
All right Menator01, I've got one for you. Since you seem to like a challenge I off you this one. It is the classic turtle race example that I have... |
|
codingCat |
Code sharing |
34 |
8,340 |
May-09-2022, 11:49 AM |
|
|
Thread: Python 25 Line Challenge
Post: RE: Python 25 Line Challenge
Here is another humble submission from yours truly, a drawing program staring the turtle, complete with color change in 25 lines.
from turtle import *
from random import *
leo = Turtle()
l... |
|
codingCat |
Code sharing |
34 |
8,340 |
May-04-2022, 07:06 PM |
|
|
Thread: Python 25 Line Challenge
Post: RE: Python 25 Line Challenge
(May-03-2022, 07:49 PM)menator01 Wrote: eight lines. As before there is not any kind of validation. typing anything other than the key words will result in errors.
Again, most impressive. :-D |
|
codingCat |
Code sharing |
34 |
8,340 |
May-04-2022, 06:55 PM |
|
|
Thread: Python 25 Line Challenge
Post: RE: Python 25 Line Challenge
(May-03-2022, 12:24 PM)Gribouillis Wrote: It depends a lot on the libraries that one is allowed to import. Can we use any library in Pypi or just the standard library?
I'm a teacher so I lean toward... |
|
codingCat |
Code sharing |
34 |
8,340 |
May-04-2022, 06:52 PM |