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
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:
):
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
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)
{}
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
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,
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.
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
, 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
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
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
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
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
] 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
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
] 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
16 matches
Mail list logo