How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site. Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask Ingo U Your Own Question
Ingo U
Ingo U, Software Engineer
Category: Homework
Satisfied Customers: 755
Experience:  Over 25 years experience in software development. Expert in Microsoft .Net, C#, C++, VB, SQL
44076068
Type Your Homework Question Here...
Ingo U is online now
A new question is answered every 9 seconds

Need help with a python program

Customer Question

Need help with a python program
Submitted: 1 year ago.
Category: Homework
Expert:  drivenjesus replied 1 year ago.

Hello!

Can we get more details on this? Deadline? What is it supposed to do? Are we looking to fix errors in your modules or simply link them? What calls are made to access the module (what is the expected return value (integer string, combination of them? That would be returned from each module?

Customer: replied 1 year ago.
not due till tomorrow before midnight. I have the first part done I just can't figure out how to run the program I will upload what I have and what is needed. I've created the classes which are needed to write the program and somewhat of the program itself. The issue I'm having is creating a list that will only pull for the car or truck class. If i'm doing it wrong I totally understand I'm still learning the python. Any Help will be great thank you
Expert:  drivenjesus replied 1 year ago.

Ah, car/or, or car and/or?

Expert:  drivenjesus replied 1 year ago.

and/or both? :)

Customer: replied 1 year ago.
both I believe lol to be honest I've got through this whole semester fine and this is the first program that has stumped me. I just don't understand if I need two sperate list one for each class: car and truck
Expert:  drivenjesus replied 1 year ago.

Well of course! If only to be stored and quickly merged or displayed. Unless you can figure calling both classes and outputting each of them before ending.

Expert:  drivenjesus replied 1 year ago.

call _repr_?

Customer: replied 1 year ago.
Call _repr_? Did I write that I think that's a mistake
Expert:  drivenjesus replied 1 year ago.

All cars by price, all trucks by price, all vehicles by price, all vehicles by manufacturer.

I see you have a price declared in _init_ but no price object in truck class

Expert:  drivenjesus replied 1 year ago.

You set price in vehicle class, but does truck inherit from vehicle?

Expert:  drivenjesus replied 1 year ago.

Looks like it does...so the next thing to check on is output requirements

Customer: replied 1 year ago.
it inherits from vehicle
Expert:  drivenjesus replied 1 year ago.

Have you tried testing your output using _repr_? a simple test output class to check your classes(replace the word "test()" with the module *class you want to see results on, and be aware this is to make sure your values are getting through. You can also REPR into your list if you convert the data from the unicode to str):

class Test:

def __repr__(self):

return "Test()"

t = Test()

t

Test()

print t

Customer: replied 1 year ago.
sorry I was driving into work the classes run the part I need help with is as follows: You are to write a test that will allow the user to store vehicle information. Your program should allow the user to do any of the following, until the user decides to exit.• enter a new Car
• enter a new Truck
• print out all Cars currently stored
• print out all Trucks currently stored
• accept a price as input, and output all Cars which are available under that price (before tax)
• accept a price as input, and output all Trucks which are available under that price (before tax)
• accept a price as input, and output all vehicles which are available for that price (before tax)
• accept a car manufacturer, and output all Vehicles which are made by that manufacturerEach object created must be stored for the remainder of the program, so you will need to have a list.
Expert:  drivenjesus replied 1 year ago.

I unfortunately have other projects, and will not have time to put all that together before the deadline. If I somehow do get more time open I can circle back and see if this has been done. For now I will opt out to let the others here have a chance to get this done for you. Thanks!

Expert:  Ingo U replied 1 year ago.

Hi,

I'm going to have a look to see if I can help you before your deadline tonight. What version of Python do you use?
Thanks,

Ingo U

Customer: replied 1 year ago.
3.3
Expert:  Ingo U replied 1 year ago.

OK, I'll be in touch soon. Do you have any additional information/requirements ? Sample output? Previous assignments to reference?

Customer: replied 1 year ago.
I attached my classes that I've already made as that is for the first part of the program. The second part is where I'm a bit confused. "Your program should allow the user to do any of the following, until the user decides to exit.• enter a new Car
• enter a new Truck
• print out all Cars currently stored
• print out all Trucks currently stored
• accept a price as input, and output all Cars which are available under that price (before tax)
• accept a price as input, and output all Trucks which are available under that price (before tax)
• accept a price as input, and output all vehicles which are available for that price (before tax)
• accept a car manufacturer, and output all Vehicles which are made by that manufacturerEach object created must be stored for the remainder of the program, so you will need to have a list."attached is my program so far and the second is the actual directions.
Expert:  Ingo U replied 1 year ago.

OK, please have a look at this code I wrote for you:

https://www.dropbox.com/s/w8avti7p3vcn6cf/erniecars.py?dl=0

Please let me know if you need anything else!

Regards,

Ingo U

Expert:  Ingo U replied 1 year ago.

Hi,
just following up, were you able to use my solution?
Please feel free to post any additional questions, comments or concerns you may have regarding this issue.

If you're not yet satisfied with the result, please let me know what is missing.
I will do my best to make it right for you.

Otherwise, please don't forget to rate my service - I don't get paid for my work until your rating is received.

Regards,
Ingo U

Expert:  Ingo U replied 1 year ago.
THIS ANSWER IS LOCKED!

You need to spend $3 to view this post. Add Funds to your account and buy credits.