Python! Thoughts?

Thread Solved

Join Date: Mar 2005
Posts: 1
Reputation: tikluganguly is an unknown quantity at this point 
Solved Threads: 1
tikluganguly tikluganguly is offline Offline
Newbie Poster

Re: Python! Thoughts?

 
0
  #11
Mar 20th, 2005
I am also a python newbie. but as im learing more about the language it is becomming more and more interesting for me. :cheesy:
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 4,013
Reputation: vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice 
Solved Threads: 929
Moderator
vegaseat's Avatar
vegaseat vegaseat is offline Offline
DaniWeb's Hypocrite

Re: Python! Thoughts?

 
0
  #12
Mar 21st, 2005
I looked into Ruby, Lua and Python. They are all very similar, but I like Python the best! There is a lot of Python code out there to learn from!
May 'the Google' be with you!
Reply With Quote Quick reply to this message  
Join Date: Jan 2005
Posts: 107
Reputation: reezin14 is an unknown quantity at this point 
Solved Threads: 4
reezin14's Avatar
reezin14 reezin14 is offline Offline
Junior Poster

Re: Python! Thoughts?

 
0
  #13
Apr 11th, 2005
I just started to learn the python language and it is fun relatively easy to grasp
and seems to beable to do everything that perl can do.I also want to thank you dani for including it in the language form,I know it will be a big help for me in the future.
Reply With Quote Quick reply to this message  
Join Date: Jul 2004
Posts: 11
Reputation: Jon Pierce is an unknown quantity at this point 
Solved Threads: 1
Jon Pierce Jon Pierce is offline Offline
Newbie Poster

Re: Python! Thoughts?

 
0
  #14
Jul 7th, 2008
Originally Posted by serfurj View Post
Originally Posted by alc6379
you can make binary [Python] executables and distribute them, so people who don't have a Python installation to run a program written in it.
i didn't know that. are you sure??
Yes this is absolutely true.

I know of at leaset 2 tools which can accomplish this:

1. http://www.py2exe.org/
2. http://pyinstaller.python-hosting.com/

There should be a couple more.
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 1
Reputation: xopher is an unknown quantity at this point 
Solved Threads: 1
xopher xopher is offline Offline
Newbie Poster

Re: Python! Thoughts?

 
0
  #15
Sep 9th, 2008
I'M CURRENTLY LEARNING PYTHON AND I THINK THAT IT IS COOL,I HAVE BEEN ATTEMPTING TO WRITE A PROGRAM FOR A GAME CALLED "NINE MEN'S MORRIS" BUT I RAN OUT OF CREATIVE JUICE AND I AM STRUGGLING TO GO ON, SO FAR I HAVE ONLY BEEN ABLE TO DESIGN THE BOARD AND THE MEN ALSO TEXT THAT HELP WITH STARTING THE GAME,I HAVE THE CODE BELLOW AND IF YOU CAN,PLEASE HELP TO COMPLETE THE PROGRAM.

THIS IS THE PROGRAM SO FAR:
  1. from graphics import *
  2.  
  3. win =GraphWin("Nine Men's Morris" , 1100,1000)
  4.  
  5.  
  6. b1 = Circle(Point(900,100), 15)
  7. b1.setFill("blue")
  8. b1.draw(win)
  9. b2 = Circle(Point(900,200), 15)
  10. b2.setFill("blue")
  11. b2.draw(win)
  12. b3 = Circle(Point(900,300), 15)
  13. b3.setFill("blue")
  14. b3.draw(win)
  15. w1 = Circle(Point(50,100), 15)
  16. w1.setFill("black")
  17. w1.draw(win)
  18. w2 = Circle(Point(50,200), 15)
  19. w2.setFill("black")
  20. w2.draw(win)
  21. b4 = Circle(Point(900,400), 15)
  22. b4.setFill("blue")
  23. b4.draw(win)
  24. b5 = Circle(Point(900,500), 15)
  25. b5.setFill("blue")
  26. b5.draw(win)
  27. b6 = Circle(Point(900,600), 15)
  28. b6.setFill("blue")
  29. b6.draw(win)
  30. b7 = Circle(Point(900,700), 15)
  31. b7.setFill("blue")
  32. b7.draw(win)
  33. b8 = Circle(Point(900,800), 15)
  34. b8.setFill("blue")
  35. b8.draw(win)
  36. w3 = Circle(Point(50,300), 15)
  37. w3.setFill("black")
  38. w3.draw(win)
  39. b9 = Circle(Point(900,900), 15)
  40. b9.setFill("blue")
  41. b9.draw(win)
  42. w4 = Circle(Point(50,400), 15)
  43. w4.setFill("black")
  44. w4.draw(win)
  45. w5 = Circle(Point(50,500), 15)
  46. w5.setFill("black")
  47. w5.draw(win)
  48. w6 = Circle(Point(50,600), 15)
  49. w6.setFill("black")
  50. w6.draw(win)
  51. w7 = Circle(Point(50,700), 15)
  52. w7.setFill("black")
  53. w7.draw(win)
  54. w8 = Circle(Point(50,800), 15)
  55. w8.setFill("black")
  56. w8.draw(win)
  57. w9 = Circle(Point(50,900), 15)
  58. w9.setFill("black")
  59. w9.draw(win)
  60.  
  61. a_rectange= Rectangle(Point(100,100), Point(800,800))
  62. a_rectange.draw(win)
  63. a_rectange.setOutline("cyan")
  64.  
  65. w1 = Circle(Point(50,100), 15)
  66. w1.move(100,15)
  67. w1.draw(win)
  68.  
  69.  
  70. a_rectange= Rectangle(Point(380,380), Point(520,520))
  71. a_rectange.draw(win)
  72. a_rectange.setFill("black")
  73. a_rectange= Rectangle(Point(100,100), Point(800,800))
  74. a_rectange.draw(win)
  75. a_rectange.setFill("white")
  76.  
  77. a_rectange= Rectangle(Point(380,380), Point(520,520))
  78. a_rectange.draw(win)
  79. a_rectange= Rectangle(Point(100,100), Point(800,800))
  80. a_rectange.draw(win)
  81. a_rectange= Rectangle(Point(250,250), Point(650,650))
  82. a_rectange.draw(win)
  83.  
  84. Line(Point(100,450),Point(380,450)).draw(win)
  85. Line(Point(520,450),Point(800,450)).draw(win)
  86. Line(Point(450,100),Point(450,380)).draw(win)
  87. Line(Point(450,520),Point(450,800)).draw(win)
  88.  
  89. Text(Point(900,100), "b1").draw(win)
  90. Text(Point(550,50), " click a MAN you wana move").draw(win)
  91.  
  92. shape_pos =win.getMouse()
  93. if shape_pos.getY() <100:
  94. Text(Point(550,75),"you selected b1").draw(win)
  95. elif shape_pos.getY() <200 and shape_pos.getX() <900:
  96. Text(Point(550,75),"you selected b2").draw(win)
  97. elif shape_pos.getY() <300 and shape_pos.getX() <900:
  98. Text(Point(550,75),"you selected b3").draw(win)
  99. elif shape_pos.getY() <400 and shape_pos.getX() <900:
  100. Text(Point(550,75),"you selected b4").draw(win)
  101. elif shape_pos.getY() <500 and shape_pos.getX() <900:
  102. Text(Point(550,75),"you selected b5").draw(win)
  103. elif shape_pos.getY() <600 and shape_pos.getX() <900:
  104. Text(Point(550,75),"you selected b6").draw(win)
  105. elif shape_pos.getY() <700 and shape_pos.getX() <900:
  106. Text(Point(550,75),"you selected b7").draw(win)
  107. elif shape_pos.getY() <800 and shape_pos.getX() <900:
  108. Text(Point(550,75),"you selected b8").draw(win)
  109. elif shape_pos.getY() <900 and shape_pos.getX() <900:
  110. Text(Point(550,75),"you selected b9").draw(win)
  111.  
  112.  
  113. win.getMouse()
  114. win.close()
  115. win.setBackground("green")
  116.  
  117. AND I THINK THE PROGRAM FOR MOVING SHOULD BE SOMETHING LIKE THIS:
  118. curcow=getmouse(win)
  119. next pos=getmouse(win)
  120. i=0
  121. while player1[i]!=curcow:
  122. i+=1
  123. nx=nextpos.getx()
  124. ny=nextpos.gety()
  125.  
  126. cp=player1[i].counter()
  127. cx=cp.getx()
  128. cy=cp.gety()
  129.  
  130. dx=cx-nx
  131. dy=cy-ny
Last edited by cscgal; Sep 9th, 2008 at 3:49 pm. Reason: Added code tags
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 666
Reputation: ZZucker is on a distinguished road 
Solved Threads: 38
ZZucker's Avatar
ZZucker ZZucker is offline Offline
Practically a Master Poster

Re: Python! Thoughts?

 
0
  #16
Sep 11th, 2008
What a poor example of Python, violates all the Zen! There is an outcry for loops and functions.

  1. import this
Never argue with idiots, they'll just bring you down to their level and beat you with their experience.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Other Threads in the Python Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC