On 10/28/2013 4:55 PM, Alex Tenno wrote:
Hey everyone,
Hey back.
I'm encountering a problem with a python function that I am supposed
to create.
What is the problem? You have not told us that!
What class is this for? I guess either the class is not the right one
for you (over your head) or the class is just a dud, or you got behind.
It will help us if you explain your circumstances.
Also we like to see any effort you have put into solving the problem.
What version pf Python? What Operating System? What do you use to write
your programs? How do you run them?
I want my function to look at a string, and then replace each letter
in the string with its relative position in the alphabet. for example,
'abcde' would return '12345', 'zabd' would return '4123', and 'xpft'
would return '4213'. I have been given hints that tell me "You may
want to iterate over the letters ch in s as in the for loop above, and
inside that for loop, count the number of letters that are in s and
come before the loop variable ch. You will also need an accumulator to
build the permutation the function will return."
--
Bob Gailer
919-636-4239
Chapel Hill NC
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor