Question

help ASAP in python codio, In this exercise you will use the class you created in...

help ASAP in python codio, In this exercise you will use the class you created in the previous challenge exercise to create an object called MyRedBike. To begin, copy the code from the prior exercise and paste it to the file on your left. Next create your new object and assign to the attribute color the value "red". Further assign to tires the value "fat tires". Finally assign to num_speeds the integer value 7. Invoke or call all of the methods listed in the following order:

  • MoveForward
  • MoveRight
  • MoveLeft
  • Brake

Finally print to the screen all three of your attributes in the following order:

  • color
  • tires
  • num_speeds

When you run your program it should produce the following output:

Moving Forward
Turning Right
Turning Left
STOP
red
fat tires
7
0 0
Add a comment Improve this question Transcribed image text
Answer #1

MyRedBike=classname()#replace classname by name of the class
MyRedBike.color='red'
MyRedBike.tires='fat tires'
MyRedBike.num_speeds=7
MyRedBike.MoveForward()
MyRedBike.MoveRight()
MyRedBike.MoveLeft()
MyRedBike.Brake()
print(MyRedBike.color)
print(MyRedBike.tires)
print(MyRedBike.num_speeds)

Add a comment
Know the answer?
Add Answer to:
help ASAP in python codio, In this exercise you will use the class you created in...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • help asap in python codio, A good friend of yours owns a small company that produces...

    help asap in python codio, A good friend of yours owns a small company that produces a tool the helps disabled individuals open jars and containers. Rather than buy a time clock mechanism, he would like to put an old computer on the warehouse floor that could be used as the time clock and help them manage materials, shipments, etc. Your friend was able to find an inexpensive application to keep track of each employee’s hours. However, this application did...

  • Python Code Question# 1 General Instructions Create a class called LawnService that takes in the length...

    Python Code Question# 1 General Instructions Create a class called LawnService that takes in the length and width of a yard, along with the current state of the yard. The currect state can be: poor, acceptable or great. Within this class include a constructor that will assign these values to attributes. Additionally create three methods that will be named and do the following: *DetermineApplication: This method will focus on the lawn status attribute. If the status is poor, the lawn...

  • Use Java and please try and show how to do each section. You are creating a 'virtual pet' program...

    Use Java and please try and show how to do each section. You are creating a 'virtual pet' program. The pet object will have a number of attributes, representing the state of the pet. You will need to create some entity to represent attributes in general, and you will also need to create some specific attributes. You will then create a generic pet class (or interface) which has these specific attributes. Finally you will make at least one subclass of...

  • PYTHON 3.6 Overview In this assignment we implement a class called TripleString. It consists of a...

    PYTHON 3.6 Overview In this assignment we implement a class called TripleString. It consists of a few instance attribute and a few instance methods to support those attributes. In the next assignment, the TripleString class will help us create a more involved application. Before we do that though, we have to thoroughly test our TripleString implementation. Specifications The class TripleString will contain symbolic constants, instance attributes, and instance methods. ▶ Class symbolic constants This class has 3 symbolic constants, which...

  • #PYTHON# In this exercise you will write code which loads a collection of images (which are...

    #PYTHON# In this exercise you will write code which loads a collection of images (which are all the same size), computes a pixelwise average of the images, and displays the resulting average. The images below give some examples that were generated by averaging "100 unique commemorative photographs culled from the internet" by Jason Salavon. Your program will do something similar. Write a function in the cell below that loads in one of the sets of images and computes their average....

  • You must manually create a data table as shown in Table 2 into worksheet "Prob2". You...

    You must manually create a data table as shown in Table 2 into worksheet "Prob2". You should format the cells manually (i.e., not via code) in Excel. The upper left corner of Table 2 (i.e., the label "Container Type") should be entered in cell B2. Note that the worksheet “Prob2” does not display gridlines. Table 2. Data for Problem 2. SOLUTION REQUIREMENTS Write a sub procedure named Sort_by_Embodied that will: Use the End property of the Range object to copy...

  • I need help with these Java programming assignements. public class Die { //here you declare your...

    I need help with these Java programming assignements. public class Die { //here you declare your attributes private int faceValue; //operations //constructor - public Die() { //body of constructor faceValue=(int)(Math.random()*6)+1;//instead of 1, use random approach to generate it } //roll operation public void roll() { faceValue=(int)(Math.random()*6)+1; }    //add a getter method public int getFaceValue() { return faceValue; }    //add a setter method public void setFaceValue(int value) { faceValue=value; } //add a toString() method public String toString() { String...

  • Problem 3: A Connect Four Player Class In this problem, you will create a Player class...

    Problem 3: A Connect Four Player Class In this problem, you will create a Player class to represent a player of the Connect Four game. In combination with the Board class that you wrote in Problem 2 and some code that you will write in the next problem set, this will enable you to play a game of Connect Four with a friend! Getting started Begin by downloading the file ps11pr3.py and opening it in Sypder or your editor of...

  • Create a UML diagram to help design the class described in exercise 3 below. Do this...

    Create a UML diagram to help design the class described in exercise 3 below. Do this exercise before you attempt to code the solution. Think about what instance variables will be required to describe a Baby class object; should they be private or public? Determine what class methods are required; should they be private or public? 3. Write Java code for a Baby class. A Baby has a name of type String and an age of type integer. Supply two...

  • Exercise 4-4      Create an object and use it with the Number Guessing Game In this exercise,...

    Exercise 4-4      Create an object and use it with the Number Guessing Game In this exercise, you’ll convert a number guessing game so it uses some object-oriented features. The class we create will have 3 private instancevariables, 2 constructors, 3 getmethodswhich return a value, and 1 methodthat acts as a sub procedure. The logic for creating a random number and tracking the # of guesses is moved to this new class. Review the project Start NetBeans and open the project...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT