selfteaching / selfteaching/selfteaching-python-camp

Day04 VScode出现:syntax error near unexpected token `/anaconda3/bin/python

Open
#941 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
Python
Stars
151
Forks
875
PR merge metrics
No merged PRs in 30d

Description

Screen Shot 2019-03-27 at 16 49 51

Screen Shot 2019-03-27 at 17 06 29
@realcaiying 最好的教练
#以下是代码,最大的疑问是:一样的代码在IDLE上运行却没有问题?

print("please enter'nine()' or 'mini_nine()':")
def nine():
    for i in range(1,10):
        for j in range(1,10):
            if i >= j:
                print("%d * %d = %d"%(i,j,i*j),end='\t')
        print()

def mini_nine():
    i=1
    while i<10:
        j=1
        while j<10:
            if i >= j and i%2 != 0:
                print("%d * %d = %d"%(i,j,i*j),end='\t')
            j+=1
        print()
        i+=1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Python code shown in the issue and compare how it is launched in VS Code and IDLE, paying attention to the /anaconda3/bin/python path shown in the error. Reproduce the syntax error in VS Code, identify the interpreter or launch difference, and confirm that the example runs successfully there.

Written by the indexing model from the issue text.

Assessment

Tech stack
anaconda, python, vscode
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
18/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.