Programming Challenges

Space Challenge

Mission Briefing Goal: To complete as many successful missions as possible before launching the rocket to the Mars Outpost. Your Task – to carry out successful missions and establish the Mars Outpost. Tick off each mission as you design and create attachments, code and successfully execute each mission.Show the Mission Commander your attempt.Take photos of

Space Challenge Read More »

8. Racey – Direction Vectors

Now we want to add a vector for movement. STEP ONE: MODIFYING THE INIT FUNCTION Inside our class initialisation function ( __init__) we can create a vector for movement add the following to the __init__ function # Create a random speed vector.movespeed = random.randint(1, 10)directionx = random.random()*movespeed * random.choice((-1, 1))directiony = random.random()*movespeed * random.choice((-1, 1))self.vector

8. Racey – Direction Vectors Read More »