[Tutor] class with objects

2009-10-11 Thread shellc...@juno.com
I want to display the ship default value for zero and display the ship's initial fuel level. Also have a method called status that displays an object's name and fuel values. I want to have several Ship objects and call their status() methods to test various aspects of the class constructor. He

[Tutor] how to define a function with multple parameters

2009-09-22 Thread shellc...@juno.com
I want to know how to use multiple parameters for 1 function def display(message): print message def rate_score(): score = rate_score if rate_score <= 999: print "that's nothing." elif rate_score <= 1: print "ok." elif rate_score >= 1: print "great."

[Tutor] (no subject)

2009-09-13 Thread shellc...@juno.com
I want to take two tuples and and print out all the elements in both tuples Best Weight Loss Program - Click Here! http://thirdpartyoffers.juno.com/TGL2141/fc/BLSrjpTFoYayK1TMy2HLJuXWZVUVwGcRz3BvRi27bhNCVhUuOvezC0KPl88/ _

[Tutor] (no subject)

2009-09-10 Thread shellc...@juno.com
I want to display all the cards in a deck of playing cards using two tuples for all the possible suits. value = ("A","2","3","4","5","6","7","8","9","10","J","Q","K") suit = ("c","h","s","d") deck = value[0:1] + suit[0:1] for item in deck: print item This is the display >>> A c

[Tutor] (no subject)

2009-09-08 Thread shellc...@juno.com
I,m trying to get a phrase from a user and print it backwards using the for statement along with the range function, but all I get with range function is integers not alpha. example range(-1) does not work. message = raw_input("enter a message: ") # will produce a back ward message by e

[Tutor] (no subject)

2009-09-08 Thread shellc...@juno.com
I want to write a code that allows me to input a phrase and calculate the number of vowels twice. once with the for loop and second with the while loop.I can get the for loop to work but, not the while loop. this is my code and response. #demo for loop, and while loop phrase = raw_input("