Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with Classes
#1
Hello!i am 16 years old and my teacher at school decided to teach us Python.At the beginning Python was easy until the moment classes and inheritance showed up!
i have an exercise here and i would like to help me (if you can of course).There are some points where i have queries.
Here is my exercise:
"You decided to create a game called "DangerousShapes".Τhe player moves on a (11,29)grid where random shapes appear and block his path.Those shapes are spheres and triangles.For triangles we know width,lengh and height and for spheres their radius.The triangles give penalty 5 moves to the player and the spheres give penalty of 3 moves.
Create:
1.Classes and subclasses where you must write all the necessary information like characteristics of shapes and their coordinates.
2.Create a list to save 12 random shapes
3.Every shape must have coordinates inside the grid and the coordinates must be created in random way for each shape and check if there is another shape in that spot.
4.Use print to check if there are 12 shapes in the grid and show their coordinates"

That is my exercise.
when i return home (i am at school now) i will show you what i have done -but i think its wrong at some points- and please do not yell at me.. Big Grin

Basically i am confused with 2 and 3.
but i will show you and number 1 question to help me correct it (if you can of course)
Reply


Messages In This Thread
Help with Classes - by Lonewolf - Feb-14-2019, 05:13 PM
RE: Help with Classes - by woooee - Feb-14-2019, 08:06 PM
RE: Help with Classes - by Lonewolf - Feb-15-2019, 08:05 AM
RE: Help with Classes - by buran - Feb-15-2019, 09:44 AM
RE: Help with Classes - by Lonewolf - Feb-15-2019, 10:06 AM
RE: Help with Classes - by buran - Feb-15-2019, 10:39 AM
RE: Help with Classes - by Lonewolf - Feb-15-2019, 11:07 AM
RE: Help with Classes - by buran - Feb-15-2019, 11:32 AM
RE: Help with Classes - by Lonewolf - Feb-15-2019, 04:55 PM
RE: Help with Classes - by buran - Feb-15-2019, 07:38 PM
RE: Help with Classes - by Lonewolf - Feb-15-2019, 09:17 PM
RE: Help with Classes - by buran - Feb-15-2019, 09:34 PM
RE: Help with Classes - by Lonewolf - Feb-16-2019, 08:09 AM
RE: Help with Classes - by buran - Feb-16-2019, 08:18 AM
RE: Help with Classes - by Lonewolf - Feb-16-2019, 08:22 AM
RE: Help with Classes - by buran - Feb-16-2019, 08:22 AM
RE: Help with Classes - by Lonewolf - Feb-16-2019, 08:55 AM
RE: Help with Classes - by buran - Feb-16-2019, 08:25 AM
RE: Help with Classes - by buran - Feb-16-2019, 09:02 AM
RE: Help with Classes - by Lonewolf - Feb-16-2019, 09:17 AM
RE: Help with Classes - by Lonewolf - Feb-16-2019, 10:52 AM
RE: Help with Classes - by buran - Feb-16-2019, 11:25 AM
RE: Help with Classes - by Lonewolf - Feb-16-2019, 11:29 AM
RE: Help with Classes - by buran - Feb-16-2019, 11:46 AM
RE: Help with Classes - by Lonewolf - Feb-16-2019, 11:50 AM
RE: Help with Classes - by Lonewolf - Feb-17-2019, 03:17 PM
RE: Help with Classes - by Lonewolf - Feb-17-2019, 06:48 PM
RE: Help with Classes - by Lonewolf - Feb-18-2019, 08:07 AM
RE: Help with Classes - by Lonewolf - Feb-18-2019, 05:35 PM
RE: Help with Classes - by sonedap - Feb-18-2019, 08:44 PM
RE: Help with Classes - by sonedap - Feb-19-2019, 06:56 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020