Import car in code

Bug description:

Expected vs Current Behavior:

Steps to reproduce:

Bug appears at this link:

Screenshot(s)/Screen Recording:

Browser/OS/Device: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36

Replit Profile:

Hey, @ramarcus welcome to the forums!

Can you please provide a link to the repl? This way it is easier for staff and members of the community to help you!

Also see this guide on how to share your code:

1 Like

the code is correct
but replit is rejecting it

Traceback (most recent call last):
  File "/home/runner/CH-10-LABaclass-Car-a1-Car-object/", line 39, in <module>
  File "/home/runner/CH-10-LABaclass-Car-a1-Car-object/", line 22, in main
    drive_car = car.Car('2023', 'Range Rover')
NameError: name 'car' is not defined. Did you mean: 'Car'?

This is the error I am getting:

Traceback (most recent call last):
  File "/home/runner/3084995333/", line 2, in <module>
    class Car:
  File "/home/runner/3084995333/", line 19, in Car
    import car
ModuleNotFoundError: No module named 'car'
exit status 1

Which is because you don’t have a file named

1 Like