I am new at python. How can i translate this pseudocode to python? Thanks...
Muhammet
0
Newbie Poster
Recommended Answers
Jump to PostThere are a couple of problems.
The spec says to run for xl=2 xu=6 es=0.001 imax=1000 iter=1 ea=0.0001. The problem is that
iter
is not a parameter. Should this bexr=1
?You don't need to import numpy. Remove it.
You have to define the function
f(x)
, likely …
Jump to PostYou're most of the way there. All the code under
def ModFalsePos
has to be indented to belong to that function, and you have to do a little initialization of some variables. That and fix a typo or two.def f(x): return -0.6 * x * …
All 7 Replies
Muhammet
0
Newbie Poster
Reverend Jim
4,678
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
Muhammet
0
Newbie Poster
Reverend Jim
4,678
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
Muhammet
0
Newbie Poster
Reverend Jim
4,678
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
Muhammet
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.