Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

input problem #24

Copy link
Copy link
@VicWenyi

Description

@VicWenyi
Issue body actions

Every time I input my code, the model forcibly modifies it into the following code, and then the generated test cases no longer match my original code.
This is my code
def jacobi(u, f, dx, Nx, Ny, itmax): # 9
x = np.zeros(Nx * Ny) # 10
for j in range(Ny): # 11
for i in range(Nx): # 12
x[i + j * Nx] = u[i + j * Nx] # 13
for it in range(itmax): # 14
for j in range(1, Ny - 1): # 15
for i in range(1, Nx - 1): # 16
x[i + j * Nx] = 0.25 * (x[(i - 1) + j * Nx] # 17
+ x[(i + 1) + j * Nx] # 18
+ x[i + (j - 1) * Nx] # 19
+ x[i + (j + 1) * Nx] # 20
- dx * dx * f[i + j * Nx]) # 21
return x # 22
But in the model, it was changed to the code shown in the image.
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.