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
Reptile [31]
3 years ago
6

python Write a program that asks a user to type in two strings and that prints •the characters that occur in both strings. •the

characters that occur in one string but not the other. •the letters that don’t occur in either string. Use the set function to turn a string into a set of characters.
Engineering
1 answer:
Yuliya22 [10]3 years ago
8 0

Answer:

see explanation

Explanation:

#we first get the elements as inputs

x = input("enter string A :")

y = input("enter string B :")

#then we make independent sets with each

x = set(x)

y = set(y)

#then the intersection of the two sets

intersection = set.intersection(x,y)

#another set for the alphabet

#we use set.difference to get the elements present in x and not in y, and

#viceversa, finally we get the difference between the alphabet and the #intersection of the elements in our strings

z = set('abcdefghijklmnopqrstuvwxyz')

print('\nrepeated :\n',intersection)

print('differences :\n',' Items in A and not B\n',

set.difference(x,y),'\nItems in B and not A\n',

set.difference(y,x))

print('\nItems in neither :\n',set.difference(z,intersection))

You might be interested in
technician a says that dirt bypassing the filter on many common rail injectors can cause an injector to stick open and continuou
NNADVOKAT [17]

Technician a is correct because he says that Many common rail injectors filters can be bypassed by dirt, which can lead to an injector sticking open and continuously fueling a cylinder.

Coalescence is used to separate the water and fuel. To the fuel injector cleaning kit, fasten your air compressor. Diesel engines run at compression ratios that are greater than those of gasoline engines. greater ratio compared to gasoline engines. increased thermal expansion as a result. more fuel energy that is transformed into usable power. The great benefit of using a dry cylinder sleeve is that by quickly installing new sleeves, the cylinder block can be quickly restored to its original specifications. Vacuum drying can be used to get rid of small amounts of water. A nozzle is used to spray the fuel into the vacuum chamber of engines. Air and unsolved free water are taken out of the oil. The fuel is evenly dispersed, which facilitates efficient drying.

Learn more about injectors here:

brainly.com/question/27969202

#SPJ4

3 0
1 year ago
A resistivity meter is measured in
Bingel [31]
Ohms ..................
3 0
2 years ago
Read 2 more answers
Why can't I fly. I dont know why?
algol13
In order to fly, you must have a device/mechanism that will release hot air, causing it to fly. A jet pack will do the job.
5 0
3 years ago
explain each of the following kinds of rockets: Solid-Fuel Rocket, Liquid-Fuel Rocket, Ion Rocket and Plasma Rocket.
Rudik [331]

Answer:

ur answer friend

Explanation:

answer

<em>S</em><em>o</em><em>l</em><em>i</em><em>d</em><em>-</em><em>F</em><em>u</em><em>e</em><em>l</em><em> </em><em>R</em><em>o</em><em>c</em><em>k</em><em>e</em><em>t</em><em> </em><em>-</em><em> </em>a solid-propellant rocket or solid rocket is a rocket with a rocket engine that uses solid propellants. The earliest rockets were solid-fuel rockets powered by gunpowder; they were used in warfare by the Chinese, Indians, Mongols and Persians, as early as 13th century.

<em>L</em><em>i</em><em>q</em><em>u</em><em>i</em><em>d</em><em>-</em><em>F</em><em>u</em><em>e</em><em>l</em><em> </em><em>R</em><em>o</em><em>c</em><em>k</em><em>e</em><em>t</em><em> </em><em>-</em><em> </em>a liquid-propellant rocket or liquid rocket utilizes a rocket engine that use liqiud propellants. An inert gas stored in a tank at a high pressure is sometimes used instead of pumps in simpler small engines to force the propellants into the combustion chamber.

<em>I</em><em>o</em><em>n</em><em> </em><em>R</em><em>o</em><em>c</em><em>k</em><em>e</em><em>t</em><em> </em><em>-</em><em> </em>an ion thruster or ion drive is a form of electric propulsion used for spacecraft propulsion. It creates thrust by accelerating ions using electricity. The Deep Space 1 spacecraft, powered by an ion thruster, changed velocity by 4.3 km/s ( 9600 mph ) while consuming less than 74 kg ( 163 lb ) of xenon.

<em>P</em><em>l</em><em>a</em><em>s</em><em>m</em><em>a</em><em> </em><em>R</em><em>o</em><em>c</em><em>k</em><em>e</em><em>t</em><em> </em><em>-</em><em> </em>in this type of rocket, a combination of electric and magnetic fields are used to break down the atoms and molecules of a propellant gas into a collection of particles that have either a positive charge (ions) or a negative charge (electrons). In other words, the propellant gas becomes a plasma.

I think its helpful to you

Please mark as brainliest answer

5 0
3 years ago
A steam turbine in a power plant receives 5 kg/s steam at 3000 kPa, 500°C. Twenty percent of the flow is extracted at 1000 kPa t
MrMuchimi

Answer:

The temperature of the first exit (feed to water heater) is at 330.15ºC. The second exit (exit of the turbine) is at 141ºC. The turbine Power output (if efficiency is %100) is 3165.46 KW

Explanation:

If we are talking of a steam turbine, the work done by the steam is done in an adiabatic process. To determine the temperature of the 2 exits, we have to find at which temperature of the steam with 1000KPa and 200KPa we have the same entropy of the steam entrance.

In this case for steam at 3000 kPa, 500°C, s= 7.2345Kj/kg K. i=3456.18 KJ/Kg

For steam at 1000 kPa and s= 7.2345Kj/kg K → T= 330.15ºC i=3116.48KJ/Kg

For steam at 200 kPa and s= 7.2345Kj/kg K → T= 141ºC i=2749.74KJ/Kg

For the power output, we have to multiply the steam flow with the enthalpic jump.

The addition of the 2 jumps is the total power output.

4 0
3 years ago
Other questions:
  • A large increase in elevation can cause a carbureted engine to run ________ if not properly adjusted for the altitude. a Rich b
    10·1 answer
  • Name two types of battery chargers that are used in mechanics
    14·1 answer
  • Ignore swell and shrinkage for this problem.
    5·1 answer
  • Design an Armstrong indirect FM modulator to generate an FM signal with a carrier frequency 98.1 MHz and a frequency deviation △
    15·1 answer
  • How many GT2RS cars were made in 2019
    7·2 answers
  • The natural material in a borrow pit has a mass unit weight of 110.0 pcf and a water content of 6%, and the specific gravity of
    11·1 answer
  • A heating torch is usually referred to as what?<br><br> Stick<br> Flower<br> Rose-bud<br> Lighter
    15·2 answers
  • Teaching how to characterize and implement high speed power devices for tomorrow's engineers
    10·1 answer
  • What are the advantages of triggering circuit<br> for thyrestors?
    5·1 answer
  • A bakery wants to determine how many trays of doughnuts it should prepare each day. Demand is normal with a mean of 15 trays and
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!