Re: [Tutor] need a hint

2013-12-04 Thread Byron Ruffin
, usSenators ) test2(Udall, usSenators2 ) main() On Tue, Dec 3, 2013 at 7:54 PM, Steven D'Aprano st...@pearwood.info wrote: On Tue, Dec 03, 2013 at 11:55:30AM -0600, Byron Ruffin wrote: What I am having trouble with is finding a way to say: if lastName appears more than once, print

Re: [Tutor] need a hint

2013-12-03 Thread Byron Ruffin
. I know I need to loop through the list of names, which I have, and set a condition dor the apppearance of a string occurring more than once in a list but I don't know how to translate this to code. How do I say: if you see it twice, do something? On 2 December 2013 02:25, Byron Ruffin byron.ruf

[Tutor] need a hint

2013-12-02 Thread Byron Ruffin
The following program works and does what I want except for one last problem I need to handle. The program reads a txt file of senators and their associated states and when I input the last name it gives me their state. The problem is Udall. There are two of them. The txt file is read by line

[Tutor] ideas?

2013-11-18 Thread Byron Ruffin
Need a little help with finding a process for this: when a string of text is input, for example: abc def. I want to have each letter shift to the right one place in the alphabet. Thus.. abc def would be output as bcd efg. Any ideas on how to do this?

[Tutor] loop running twice?

2013-11-17 Thread Byron Ruffin
def main(): goal, apr, deposit = getSavingsDetails() determineMonthsTilSaved( goal, apr, deposit ) months = determineMonthsTilSaved(goal, apr, deposit) summarize( months ) def getSavingsDetails(): goal = float( input( Principal sought? $ ) ) apr = float( input(

[Tutor] basic function concept

2013-11-16 Thread Byron Ruffin
def main(x, y, z): print (x, y, z) def funct(): x = 1 y = 2 z = 3 return x, y, z main() Can someone tell me why main is not being given any arguments? ___ Tutor maillist - Tutor@python.org To unsubscribe or change

[Tutor] space between words printed

2013-11-03 Thread Byron Ruffin
The output generates a sentence made up of words chosen randomly from lists. I am having trouble getting a space between each of the words. Should I be thinking about .split? Here is the code (ignore indent errors as it was copied and pasted) Thank you: import random def wordList(): adj1

[Tutor] cs student needs help import math

2013-09-07 Thread Byron Ruffin
I am writing a simple program based off an ipo chart that I did correctly. I need to use ceil but I keep getting an error saying ceil is not defined. I did import math, I think. I am using 3.2.3 and I imported this way... import math math.pi 3.141592653589793 math.ceil(math.pi) 4