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
What is tear test? What do we understand from this test? How?
Anvisha [2.4K]

Explanation:

The tear test determines the force required by a material to undergo complete failure when there is already a crack or tear present in it.

With this test we understand a material's resistance to failure when there is already a crack present.

The material which already has a crack is placed in a tensile testing or universal test machine. So, both sides of the material along the crack are pulled until material failure takes place.

6 0
4 years ago
Why does voltage have so many names
BARSIC [14]

Answer:

Europe and most other countries in the world use a voltage which is twice that of the US. ... Originally Europe was 120 V too, just like Japan and the US today, but it was deemed necessary to increase voltage to get more power with fewer losses and less voltage drop from the same copper wire diameter

www.worldstandards.eu › electricity › why-no-standard-voltage

Explanation:

6 0
3 years ago
Read 2 more answers
Consider a simple ideal Rankine cycle with fixed boiler and condenser pressures. If the steam is superheated to a higher tempera
Usimov [2.4K]

Answer:

Option D - the moisture content at turbine exit will decrease

Explanation:

In an ideal rankine system, the phenomenon of superheating occurs at a state where the vapor state of the fluid is heated above its saturation temperature and the phase of the fluid is changed from the vapor phase to the gaseous phase.

Now, a vapour phase has two different substances at room temperature, whereas a gas phase consists of just a single substance at a defined thermodynamic range, at standard room temperature.

At the turbine exit, since it's just a single substance in gaseous phase, it means it will have less moisture content.

Thus, the correct answer is;the moisture content at turbine exit will decrease

4 0
3 years ago
For this assignment, you will write a program to determine the time and date corresponding to an elapsed number of seconds since
Karolina [17]

A Python program should be written to produce output that corresponds to the given hour, minute, second, day of the month, month's name, year, and day of the week's name.

present_year=2016

present_month="January"

present_date="1"

present_day="Friday"

present_hour=0

present_minute=0

present_second=0

input<-from user(seconds)//taking imput from the user using Python program

   total_seconds=input

   //checking with seconds

   if(total_seconds<60)

       present_second+=total_seconds

   else

       total_minutes=total_seconds/60

       remaining_seconds=total_seconds-total_minutes*60

       present_second+=remaining_seconds

   //checking with minutes

   if(total_minutes<60)

       present_minute+=total_minutes

   else

       total_hours=total_minutes/60

       remaining_minutes=total_minutes-total_hours*60

       present_minute+=remaining_minutes

   //checklng with hours

   if(total_hours<24)

       present_hour+=total_hours

   else

       total_days=total_hours/24

       remaining_hours=total_hours-total_days*24

       present_hour+=remaining_hours

   //checking with days

   total_weeks=total_days/7

   remaining_day=total_days-total_weeks*7

   switch(remaining_day)

       case 1:

           present_day="Friday"

       case 2:

           present_day="Saturday"

       case 3:

           present_day="Sundayday"

       case 4:

           present_day="Monday"

       case 5:

           present_day="Tuesday"

       case 6:

           present_day="Wedday"

       case 7:

           present_day="Thursday"

   //checking with years    

   if(total_days>366)

       while(total_days)

           if(present_year%4==0)

               total_days-=366

               present_year+=1

           if(present_year%4!=4)

               total_days-=365

               present_year+=1

           if(present_year%4!=0&&total_days<365)

               break;

           if(present_year%4==0&&total_days<366)

               break;

   //checking with months and date

   if(total_days<=366)

       while(total_days)

           if(present_month="January")

               present_date++

               total_days--

               if(present_date==31)

                   present_month="February"

                   present_date=0

           if(present_month="February")

               present_date++

               total_days--

               if(present_date==28&&present_year%4!=0)

                   present_month="March"

                   present_date=0

               if(present_date==29&&present_year%4==0)

                   present_month="March"

                   present_date=0

           if(present_month="March")

               present_date++

               total_days--

               if(present_date==31)

                   present_month="April"

                   present_date=0        

           if(present_month="April")

               present_date++

               total_days--

               if(present_date==30)

                   present_month="May"

                   present_date=0        

           if(present_month="May")

               present_date++

               total_days--

               if(present_date==31)

                   present_month="June"

                   present_date=0        

           if(present_month="June")

               present_date++

               total_days--

               if(present_date==30)

                   present_month="July"

                   present_date=0    

           if(present_month="July")

               present_date++

               total_days--

               if(present_date==31)

                   present_month="August"

                   present_date=0    

           if(present_month="August")

               present_date++

               total_days--

               if(present_date==31)

                   present_month="September"

                   present_date=0        

           if(present_month="September")

               present_date++

               total_days--

               if(present_date==30)

                   present_month="October"

                   present_date=0    

           if(present_month="October")

               present_date++

               total_days--

               if(present_date==31)

                   present_month="November"

                   present_date=0    

           if(present_month="November")

               present_date++

               total_days--

               if(present_date==30)

                   present_month="December"

                   present_date=0

           if(present_month="December")

               present_date++

               total_days--

               if(present_date==31)

                   present_month="January"

                   present_date=0

//printing present time

print present_hour:present_minute:present_second present_date present_month present_year present_day          

Learn more about Python program here:

brainly.com/question/28691290

#SPJ4          

3 0
2 years ago
A 1:50 scale model of a ship is towed at 4.8 km/hr using a force of 9 N. If we assume the same fluid in the model as in the prot
Mashutka [201]

Answer:

A: density and gravity

Explanation:

The Froude Number is defined as a dimensionless parameter that measures the ratio of the force of inertia on an element of fluid to the weight of the fluid element. In simple terms, it's the force of inertia divided by the gravitational force.

Froudes number is usually expressed as;

Fr = v/√(gd)

Where;

Fr = froude number

v = velocity

g = gravitational acceleration = specific weight/density

d = depth of flow

Now, to calculate the corresponding speed and force in the prototype, it means we have to use equal froude number and thus this will mean that it has to be dominated by gravity and density.

4 0
3 years ago
Other questions:
  • An incoming signal is at a frequency of 500kHz. This signal needs to be acquired and all other signals attenuated. Design a pass
    5·1 answer
  • Answer every question of this quiz
    7·1 answer
  • The A-36 steel pipe has a 6061-T6 aluminum core. It issubjected to a tensile force of 200 kN. Determine the averagenormal stress
    10·1 answer
  • Matthew wants to manufacture a large quantity of products with standardized products having less variety. Which type of producti
    5·1 answer
  • Select the qualification that is best demonstrated in each example.
    11·2 answers
  • In the designation of wrought Al alloys, eg. 3m, what does the first digit-3- refer to? A. The main alloying element B. Carbon p
    15·1 answer
  • Determine the specific weight of air when the temperature is 100∘F and the absolute pressure is 60 psi . The gas constant for th
    9·1 answer
  • What happens to the amperage draw of a condensing unit on a split AC system if the liquid line is restricted
    15·1 answer
  • ⚠️I mark BRIANLIST ⚠️The same engineering teams are able to design and develop the different subsystems for an airplane.
    5·2 answers
  • Horizontal shear forces and, consequently, horizontal shear stresses are caused in a flexural member at those locations where th
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!