473,396 Members | 2,004 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

I am really lost--(dice program)

3
ok I have to do the what is on this page http://www.rschooltoday.com/school15...dice_class.doc

and i have no idea how to go about it. We use this graphics thing, here i will post it. I am suposed to do what that says, but i cat figure this one out. i will also post what i have as well. heres the graphics thing...

here is what i have sofar... its not a lot i can tell you lol...


from graphics import *

win = GraphWin()
win.setCoords(0,0,10,10)
r = Rectangle(Point(0,0),Point(10,10))
r.draw(win)

i am just really not grasping this one, i missed a few days so i have no idea where to go/what to do...


*edit* sorry about that, i did not realize you could do that this should make it easyer to read now lol
Attached Files
File Type: zip graphics.zip (6.1 KB, 84 views)
Mar 5 '08 #1
4 1434
jlm699
314 100+
Ok, so what is it that you aren't getting?

All it seems to be asking you to do is create a Class.

The code you have above may be used to test your class. I do see one problem with what you're doing however... the rectangle you draw on your window should be smaller than the grid on teh window or else it will not appear very cleanly...
Mar 5 '08 #2
Qecbum
3
Ok thanks i some what realized this as i was programing earlyer, i have since put in butons, and i am actualy done with the astetiscs, i just need to hardwire it as it were... i need to set my button to randomly chose what side of the die to use, i will post my updated code shortly...


here i am uploading my "new" code, this is only the frame work for my butons, i have to still put it into the program and then build a random genration die outcome thing... i got the buttons but i dont konw how to set it up in to the program or how to ramdomly generate the outcome, that is where i need help. i mean i have done the main framework, i just need the shell to put it in, and the random generator.... thanks for any and all help lol
Attached Files
File Type: zip Buttons.zip (527 Bytes, 75 views)
Mar 5 '08 #3
jlm699
314 100+
i just need the shell to put it in, and the random generator.... thanks for any and all help lol
Not quite sure what you mean by 'the shell to put it in'...

As far as random generator have you looked into the following?

Expand|Select|Wrap|Line Numbers
  1. >>> import random
  2. >>> random.randint(1, 6)
  3. 4
  4.  
Mar 5 '08 #4
Qecbum
3
Well think of it like a car, i got the engin and the frame work but i need the body... and the battery lol thanks for the random, but it dont know, if that is a corect random, it is using the graphics that i uploaded earlyer
Mar 8 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: ulysses | last post by:
hi, I'm working in python 5 months. I think it's very cool language. I do a p2p python program GUI. First I make a software by wxpython. But I find wxpython use many many memory. Second I use...
15
by: Aubrey Hutchison | last post by:
### this will test if your version of IDLE on windows is a MATURE program design ### print "Hello world, If Python IDLE is a mature program design it will output this" Save this simple...
2
by: atreide_son | last post by:
hello all... yes i'm a newbie and i need help. i have an assignment due for class, but I don't know i'm stuck and can't get out from under myself. here's the focus of the program: Write...
131
by: pemo | last post by:
Is C really portable? And, apologies, but this is possibly a little OT? In c.l.c we often see 'not portable' comments, but I wonder just how portable C apps really are. I don't write...
27
by: cj | last post by:
I run this program and to exit click the X in the upper right corner. But apparently it isn't really ending the program. If I return to VB and make changes then try to rebuild the app it says the...
29
by: 63q2o4i02 | last post by:
Hi, I'm interested in using python to start writing a CAD program for electrical design. I just got done reading Steven Rubin's book, I've used "real" EDA tools, and I have an MSEE, so I know what...
6
by: smokeyd | last post by:
i am trying to find an easy way for non technical people to edit an xml file. ideally this would mean that i could create a really simple interface with fields for users to complete which would...
2
Stang02GT
by: Stang02GT | last post by:
Hello, I recently was in a conversation with some friends and my one friend told us about how his younger brother had all his passwords. When my friends "questioned" his brother about it, he...
41
by: c | last post by:
Hi every one, Me and my Cousin were talking about C and C#, I love C and he loves C#..and were talking C is ...blah blah...C# is Blah Blah ...etc and then we decided to write a program that...
2
by: manontheedge | last post by:
I'm getting weird results in my program, and even compile time errors, and I've got it down to the "\n" command I use in "printf()". The program this is happening in deals with multiple processes,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.