Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7823743
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T08:21:41+00:00 2026-06-02T08:21:41+00:00

Okay, I’m really new with python and in my class the prof assigned a

  • 0

Okay, I’m really new with python and in my class the prof assigned a homework where we fix codes without wing. I’m really confused because the prompt asks us to ‘open a terminal window by clicking on the icon in the task bar that looks like a terminal screen. After it opens, it will display a prompt. Type the commands:

cd Desktop/cs141/11execution
python hello.py

So I understand what it is asking me to do and I think I opened the terminal window… but it gives me a syntax error. Can someone explain to me how to actually use python (how to open files without using wing.). I’m sorry if this sounds dumb but I’m extremely confused because i can’t even open the file to get working on it.

I opened the terminal window and I typed in the command that the homework told me to do and it gave me this:

cd Desktop/cs141/11execution
File "<stdin>", line 1
cd Desktop/cs141/11execution
SyntaxError: invalid token
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T08:21:45+00:00Added an answer on June 2, 2026 at 8:21 am

    Because your actual homework assignment is to run and debug code without the help of an IDE, I figure I can at least give you details about the process leading up to that which is troubling you… And I can edit this answer to suit your updates.

    When you open a terminal, you should see a command prompt waiting for input. This is a shell. Which shell you are in by default is system-dependent, but lets assume its “bash”. Its probably bash if you see the prompt ending in “$”

    When you are in a bash shell, you can issue commands. Python scripts start out by telling the system what type of interpreter it would need to be understood. Your script most likely starts with something like #!/usr/bin/env python, telling the system that the following text should be run using python.

    Make sure you are actually in the command prompt and NOT a python interpreter

    So once you have a terminal open, you first wanted to change to the directory where your python script is located. cd /path/to/location tells bash to change the current working directory. You would now be located in the spot where your python script exists.

    When you run python myscript.py, you are explicitly telling python to run this script, regardless of what is at the top of the script with the #!.... At this point, your script should execute and the output would be related to the script.

    In your example output, you have most likely entered a python interpreter, which is possibly by simply typing python. You can verify this if you end up seeing it waiting for input with >>>. At this point you have done something wrong. cd is not a valid python command. It is a shell command.

    Update

    You are now obviously in windows, so as I mentioned in my main comment… Open the command prompt by going to Start Menu -> Run -> Type ‘cmd’ -> Hit Enter. Now continue following your directions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay i have seen TouchXML, parseXML, NSXMLDocument, NSXMLParser but i am really confused with
Okay, This may be really simple or it may not even be possible, or
Okay so I made this program to help me out with my homework and
Okay, this is the case: I got a generic base-class which I need to
okay, I know I am new to obj-c, but for all intents and purposes
Okay so I have a simple HTML Input fragment: <input id=txtFirstName type=text class=txtBox runat=server
Okay, I know I have to be doing something wrong here because the performance
Okay, so I've got a class where one of the attributes is a callback
Okay say your using a app, and you opened a new activity and then
Okay, I think I'm just making a stupid mistake here, but I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.