1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
lidiya [134]
4 years ago
9

(Using Python)Part 2aNumerology is the "study of the purported mystical or special relationship between a number and observed or

perceived events." It has been used throughout human history as a way to attach meaning to a name, object or event using mathematics. It is considered a "pseudoscience" by modern scientists since it has no basis in observable phenomena. With that said, it makes a great programming challenge so we're going to go with it! :)What you want to do for this project is to ask the user to type in their name. Next, you will need to use a technique called "theosophical reduction" to convert their name into a number. With this technique we assign each letter of the alphabet its own number. For example, the letter "a" is equal to the number 1. "b" = 2, "c" = 3, "z" = 26, etc. You should ignore non-alphabetic characters (i.e. numbers, spaces and special characters)Once you've gotten all of the letters converted into numbers you can add them up into one single number. This is the "numerology number" for the name that the user entered.So for the name "craig" the numerology number would be:c = 3r = 18a = 1i = 9g = 73 + 18 + 1 + 9 + 7 = 38Here's are a few sample runnings of this program:Name: craigYour 'cleaned up' name is: craigReduction: 38Name: craig kappYour 'cleaned up' name is: craigkappReduction: 82Name: rumple stil skinYour 'cleaned up' name is: rumplestilskinReduction: 198Name: !rumple!stil!skinYour 'cleaned up' name is: rumplestilskinReduction: 198Name: pikachu!pikapika!Your 'cleaned up' name is: pikachupikapikaReduction: 143Name: PIKACHUpikapikaYour 'cleaned up' name is: pikachupikapikaReduction: 143Some hints:Convert the user's name to all uppercase or all lowercase before you do anything elseRemove any spaces, numbers or special characters from the name to ensure that you are only working with the letters A-ZThe ord() function may be userful to convert each character into an ASCII index
Engineering
1 answer:
Mumz [18]4 years ago
3 0

Answer:

See explaination for python programming code

Explanation:

Python programming code below

import re

s = "abc" # enter string here

#s = "hello world! HELLOW INDIA how are you? 01234"

# Short version

print filter(lambda c: c.isalpha(), s)

# Faster version for long ASCII strings:

id_tab = "".join(map(chr, xrange(256)))

tostrip = "".join(c for c in id_tab if c.isalpha())

print s.translate(id_tab, tostrip)

# Using regular expressions

s1 = re.sub("[^A-Za-z]", "", s)

s2 = s1.lower()

print s2

import string

values = dict()

for index, letter in enumerate(string.ascii_lowercase):

values[letter] = index + 1

sum = 0

for ch2 in s2:

for ch1 in values:

if(ch2 == ch1):

sum = sum + values[ch1]

print sum

You might be interested in
Marco is a franchisee with Daggies, a chain of sandwich shops. His business was doing well until several Daggies franchisees got
Oliga [24]

Answer:

The coattail effect

Explanation:

Clearly, the Daggies franchise were a huge part of Marco's success and attracted many customers for the business. This is why Marco deteriorated as soon as many Daggies franchisees closed.

The coattail effect is the phenomenon where an influencing member in a party (franchisee in this case)  contributes largely to the success of another, which is the case with Marco and Daggies

3 0
4 years ago
What part connect to the tie rod that helps the brake chamber out that deals with slack adjuster
scoray [572]

Answer:

none

Explanation:

7 0
2 years ago
What is the unit of electric current?
Bess [88]

Answer: amps, or amperes

Explanation: Electric current is measured in amperes, usually shortened to amps.

6 0
3 years ago
5. It is stated that the temperature in a plane wall with constant thermal conductivity and no heat generation varies linearly d
NemiM [27]

Answer:

attached below

Explanation:

6 0
3 years ago
An agent in another state wants to become an agent in New York. The other state gives the same privileges to New York agents wan
IrinaVladis [17]

Answer: The answer is Reciprocity.

Explanation: This is an act that happens when a state (A) grants the same right and privileges to other individuals or citizens from another state (B) as it would to its own individuals or citizens. The same act is expected to be reciprocated from the state (B) to individuals or citizens from state (A). Thus the word 'reciprocity' was given to this act and coined from the word 'reciprocate'.

4 0
3 years ago
Other questions:
  • A 400-m^3 storage tank is being constructed to hold LNG, liquefied natural gas, which may be assumed to be essentially pure meth
    8·1 answer
  • Mike is involved in developing the model building codes that various states and local authorities in the United States adopt. He
    6·1 answer
  • Given a matrix, clockwise-rotate elements in it. Please add code to problem3.cpp and the makefile. Use the code in p3 to test yo
    8·1 answer
  • Which of the following is an example of an iterative process?
    12·1 answer
  • How does it produce a 3D component?
    8·1 answer
  • Please answer the following questions.
    9·2 answers
  • A 2-m3 rigid tank initially contains air at 100 kPa and 22°C. The tank is connected to a supply line through a valve. Air is flo
    14·1 answer
  • In part A you are asked to write the pseudocode for the program. In part B you are asked to write the syntax of the code for the
    11·1 answer
  • The human eye, as well as the light-sensitive chemicals on color photographic film, respond differently to light sources with di
    13·1 answer
  • A punch must cut a hole 30mm diameter in a sheet of steel 2mm thick. The ultimate shear
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!