Problems on these two questions
su29090
129km09 at gmail.com
Sun Nov 18 21:15:40 EST 2012
More information about the Python-list mailing list
Sun Nov 18 21:15:40 EST 2012
- Previous message (by thread): Problems on these two questions
- Next message (by thread): Problems on these two questions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sunday, November 18, 2012 8:52:35 PM UTC-5, su29090 wrote: > I did all of the other problems but I have issues with these: > > > > 1.Given a positive integer n , assign True to is_prime if n has no factors other than 1 and itself. (Remember, m is a factor of n if m divides n evenly.) > > > > 2.An arithmetic progression is a sequence of numbers in which the distance (or difference) between any two successive numbers if the same. This in the sequence 1, 3, 5, 7, ... , the distance is 2 while in the sequence 6, 12, 18, 24, ... , the distance is 6. > > > > Given the positive integer distance and the positive integer n , associate the variable sum with the sum of the elements of the arithmetic progression from 1 to n with distance distance . For example, if distance is 2 and n is 10 , then sum would be associated with 26 because 1+3+5+7+9 = 25 . > > > > Thanks in advance. I'm using Python 3.2
- Previous message (by thread): Problems on these two questions
- Next message (by thread): Problems on these two questions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list