[Tutor] I need help on this program please

2013-07-10 Thread Ashley Fowler
This is what I have to do : On a standard telephone, the alphabetic letters are mapped to numbers in the following fashion:   A, B, AND C=2 D, E, AND F=3 G, H, AND I=4 J, K, AND L=5 M, N, AND O=6 P, Q, R, AND S=7 T, U, AND V=8 W, X, Y AND Z=9   Write a program that asks the user to enter a

[Tutor] Str method

2012-11-04 Thread Ashley Fowler
I'm trying to initialize a list to several elements using the string method. I have some idea that you use a for loop I suppose... Could anybody help me out? ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options:

Re: [Tutor] Str method

2012-11-04 Thread Ashley Fowler
):     return _SetIterator( self._theElements )   def __str__(self):     for element in str(self._theElements):       return element      From: Oscar Benjamin [oscar.j.benja...@gmail.com] Sent: Sunday, November 04, 2012 8:52 PM To: Ashley Fowler Cc: tutor

[Tutor] Str Method

2012-11-01 Thread Ashley Fowler
Hello I am trying to add a str method to a Set ADT implementation to allow a user to print the contents of a set. However the resulting string should look like that of a list. except I am suppose to use curly brackets to surround the elements. For an example... set1 = Set() print(set1) {}

[Tutor] Print List

2012-09-12 Thread Ashley Fowler
I am trying to complete the following below: You also need to write a function printList of one parameter that takes a list as its input and neatly prints the entire contents of the list in a column. Each student in the list should be printed using __str__. So far i have: def

[Tutor] Question

2012-09-11 Thread Ashley Fowler
I have a question. In a assignment it asks for me to do the following below... if peek then print the Student object at the beginning of the list (using __str__) but don't remove it from the list; Could you explain what it means? This is what I have so far,

[Tutor] Constructing a object

2012-09-11 Thread Ashley Fowler
How do you construct a object using variables? For instance I have to construct a student object, by first prompting the user to enter variables for the Student class (their first and last names, credits and gpa) then construct a Student object using those variables.

[Tutor] Student Class

2012-09-05 Thread Ashley Fowler
I need help creating a student class. I am suppose to create a student class with there first name, last name, credits and gpa. Can anybody help me get started? Below is what needs to be included. For number one, is the variables suppose to be parameters? for instance, class Student: def

Re: [Tutor] Student Class

2012-09-05 Thread Ashley Fowler
, Ashley Fowler wrote: I need help creating a student class. We don't do your homework for you we will only offer hints. So you need to show us what you are trying and we will try to steer you to something better. class with there first name, last name, credits and gpa. Can anybody help me get

[Tutor] Printing a list as a column

2012-08-30 Thread Ashley Fowler
Does anyone know how to print a list in a form of a column instead of a row? ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] Printing list in a Column

2012-08-30 Thread Ashley Fowler
Can anyone help me edit this code below to return the list in the form of a column instead of a row? def printList(): list1 = input(Insert a list) list = [list1] print (list) ___ Tutor maillist - Tutor@python.org To unsubscribe or

[Tutor] Scheme

2012-08-30 Thread Ashley Fowler
This is a problem using the Scheme programming...Can anybody help me with this problem? 2. Write a procedure (sphere r) that takes the radius of a sphere as the value of its input parameter and returns the volume of that sphere given by the formula: (4/3)π(r^3). Use (require scheme/math) or

Re: [Tutor] Scheme

2012-08-30 Thread Ashley Fowler
solution. Even when you go to the Lisp or Scheme mailing list, you should at least show what you have tried, paste your own code, and tell them where you are stuck. On 31 August 2012 07:32, Ashley Fowler afowl...@broncos.uncfsu.edumailto:afowl...@broncos.uncfsu.edu wrote: This is a problem using

Re: [Tutor] Scheme

2012-08-30 Thread Ashley Fowler
] Scheme On 31/08/2012 00:32, Ashley Fowler wrote: This is a problem using the Scheme programming...Can anybody help me with this problem? 2. Write a procedure (sphere r) that takes the radius of a sphere as the value of its input parameter and returns the volume of that sphere given

[Tutor] Question

2012-08-23 Thread Ashley Fowler
I am trying to complete an assignment and I am stuck at the if-else statements area. Could someone please help me? the instructions and what I have so far are below... Instructions: Your main function should do the following: (1) create an empty list; (2) ask the user if he/she wants to

Re: [Tutor] Question

2012-08-23 Thread Ashley Fowler
] Question On 23/08/12 18:02, Ashley Fowler wrote: def main(): l = list() x = eval(input('Enter a number: ')) Don;t use eval() its bad practicecand fort advanced use only. Instead explicitly convert to int() or float() while x = 0: l.append(x) x = eval(input('Enter