Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Program Details (Please write in Python) We start by assigning every letter a value between 1 and 9. A table containing the number related to

Program Details (Please write in Python)

We start by assigning every letter a value between 1 and 9. A table containing the number related to each letter is given below (Cheiro 48-53).

Letter | Number

A = 1

B= 2

C= 3

D= 4

E= 5

F= 8

G= 3

H= 5

I= 1

J= 1

K= 2

L= 3

M= 4

N= 5

O= 7

P= 8

Q= 1

R= 2

S= 3

T= 4

U= 6

V= 6

W= 6

X= 5

Y= 1

Z= 7

To compute a name number we need a name as an example. We will use "Louis" as our example name.

First, we figure out the number related to each letter of the name.

L = 3, O = 7, U = 6, I = 1, S = 3

Next, we add all the numbers together.

3 + 7 + 6 + 1 + 3 = 20

Originally, we noted that every name number is between 1 and 9. We just computed 20! If the value computed is larger than 9, we add the digits together. Depending on how big the number is, you may need to add the digits multiple times before it is between 1 and 9.

2 + 0 = 2

We have determined that the name number for "Louis" is 2.

Next, we need to see what this predicts about Louis. We match the number up with the following chart (Cheiro 48-53).

Name Number Meaning

1= A person who is successful in personal ambitions.

2= A gentle and artistic person.

3= A success in their professional career.

4= An unlucky person who much put in extra work for success.

5= A lucky person who leads an unconventional life.

6= A person who commands the respect of others.

7= A person who has a strong inner spirit.

8= A person who is misunderstood by others and is not respected for their success.

9= A person who is more successful in matters of the material than spiritual.

You will write a program that asks the user for their name and produces their name number.

If given any characters not on the list (spaces, hyphens, etc) count them as 0. They do not contribute to the name number.

Required Functions

You will solve this problem by writing three functions.

def sumDigits(number) takes a number a repeatedly sums the digits until the number is smaller than 10. You may assume the number give is always positive.

def nameNumber(name) takes a string containing a name as input. It returns the name number and integer between 1 and 9. The function will return 0 on bad input, for example an empty string.

def prediction(number) takes an integer between 1 and 9. It returns the meaning of the number. If a number outside the range is given return "Invalid Input" as the result string. You must use a dictionary to organize the predictions.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions