[Tutor] Problem with variables

docnova docnova at charter.net
Fri Oct 24 01:10:51 EDT 2003


This program is my first intended project. This program(upon completion) will give a complete (too my limited knowledge) numerology reading upon the input of the users name and birthday. 

There are several problems that I need to figure out how to address. The first (and biggest) is the inuput of the users name. In numerology the one of the core numbers is acheived by adding each letter of the users full name together. As of now the only solution is for the user to enter the name as such "J+O+H+N+S+M+I+T+H".

The ideal scenario would be for "John Smith" to be translated into "J+O+H+N+S+M+I+T+H"

How would I make this action possible?


Here is the source i have so far:

#This program will give a complete numerology rating :)
#Each letter represents a number. Each letter is given its proper value.
a=1;  A=1
b=2;  B=2
c=3; C=3
d=4; D=4
e=5; E=5
f=8; F=8
g=3; G=3
h=5; H=5
i=1; I=1
j=1; J=1
k=2; K=2
l=3; L=3
m=4; M=4
n=5; N=5
o=7; O=7
p=8; P=8
q=1; Q=1
r=2; R=2
s=3; S=3
t=4; T=4
u=6; U=6
v=6; V=6
w=6; W=6
x=6; X=6
y=1; Y=1
z=7; Z=7
print "Welcome"
print "This program will give you a complete numerology rating :)"
name = raw_input("Please enter your full name (first, middle, last): ")
print "Hello there", name +"."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20031024/72b56a73/attachment.html


More information about the Tutor mailing list