That's Bob, and Tony, exactly what I'm looking for. ( not the answer, but the path to it... )<br><br>Let me get back to you with my result after I study this a bit.<br>thanks!!<br><br>Jeffrey Dates<br><a href="http://www.kungfukoi.com">www.kungfukoi.com</a><br>
<br><br><br><br><div class="gmail_quote">On undefined, bob gailer <<a href="mailto:bgailer@alum.rpi.edu">bgailer@alum.rpi.edu</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">Jeffrey Dates wrote:<br>
> Greetings,<br>
><br>
> I have no previous experience in scripting. Python is my first<br>
> language...<br>
> I'm currently trying to build a logic model for how to 'think' in<br>
> Python, so please excuse my ignorance.<br>
><br>
> Currently, I'm running through some basic 101 tutorials, to wrap my<br>
> head around solving problems.<br>
> I'm looking for some advice on how to solve the following exercise:<br>
><br>
> "Write a program that prints the first letter of a string that comes<br>
> after 'm' in the alphabet."<br>
><br>
</div><div class="Ih2E3d">> what I had so far:<br>
><br>
> for code in range(ord("a"), ord("z") +1):<br>
> if code == ord("m"):<br>
> print chr(code +1)<br>
><br>
> Now, this solves for the first letter after "M"<br>
<br>
</div>which is NOT what the exercise wants!<br>
<br>
Consider "are you ready?". Which character is the first that comes after<br>
'm' in the alphabet."?<br>
<br>
BTW did you mean after "m"? Caps and lower case are different.<br>
<div class="Ih2E3d"><br>
> , but doesn't do it via a string....<br>
<br>
</div>I for one am reluctant to just give an answer. I prefer to lead you to a<br>
solution.<br>
<br>
So, I suggest you write a program to:<br>
assign a candidate string to a variable (choose a string that has at<br>
least one letter that "comes after 'm'")<br>
test each character to see if it "comes after 'm'"<br>
print that character<br>
stop<br>
<br>
Do as much as you can, and ask more questions.<br>
<font color="#888888"><br>
--<br>
Bob Gailer<br>
919-636-4239 Chapel Hill, NC<br>
<br>
</font></blockquote></div><br>