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
Calculate the electroosmotic velocity of an aqueous solution through a glass capillary 5 cm long with a 0.5 mm internal diameter
natita [175]

Answer:

Electroosmotic velocity will be equal to 1.6\times 10^{-4}m/sec

Explanation:

We have given applied voltage v = 100 volt

Length of capillary L = 5 mm = 0.005 m

Zeta potential of the capillary surface \xi =80mV=0.08volt

Dielectric constant of glass is between 5 to 10 here we are taking dielectric constant as \epsilon =10

Viscosity of glass is \eta =10^8

Electroosmotic velocity is given as v_{eo}=\frac{\epsilon \xi }{\eta }\times \frac{v}{L}

v_{eo}=\frac{10\times 0.08 }{10^8 }\times \frac{100}{0.005}=1.6\times 10^{-4}m/sec

So Electroosmotic velocity will be equal to 1.6\times 10^{-4}m/sec

8 0
4 years ago
What is the effect of connecting
IrinaVladis [17]

Answer: A capacitor connected across the output allows the AC signal to pass through it and blocks the DC signal, thus acting as a high pass filter. The output across the capacitor is thus an unregulated filtered DC signal. This output can be used to drive electrical components like relays, motors, etc.

Explanation:

4 0
3 years ago
State the number of terms for each of the following algebraic expression 2x+1
harina [27]

Answer:

Expressions are made up of terms.

A term is a product of factors.

Coefficient is the numerical factor in the term

Before moving to terms like monomials, binomials, and polynomials, like and unlike terms are discussed.

When terms have the same algebraic factors, they are like terms.

When terms have different algebraic factors, they are unlike terms.

Explanation:

Hi please follow me also if you can and thanks.

6 0
3 years ago
Water is being added to a storage tank at the rate of 500 gal/min. Water also flows out of the bottom through a 2.0-in-inside di
melomori [17]

Answer:

From the answer, the water level is falling (since rate of outflow is more than that of inflow), and the rate at which the water level in the storage tank is falling is

(dh/dt) = - 0.000753

Units of m/s

Explanation:

Let the volume of the system at any time be V.

V = Ah

where A = Cross sectional Area of the storage tank, h = height of water level in the tank

Let the rate of flow of water into the tank be Fᵢ.

Take note that Fᵢ is given in the question as 500 gal/min = 0.0315 m³/s

Let the rate of flow of water out of the storage tank be simply F.

F is given in the form of (cross sectional area of outflow × velocity)

Cross sectional Area of outflow = πr²

r = 2 inches/2 = 1 inch = 0.0254 m

Cross sectional Area of outflow = πr² = π(0.0254)² = 0.00203 m²

velocity of outflow = 60 ft/s = 18.288 m/s

Rate of flow of water from the storage tank = 0.0203 × 18.288 = 0.0371 m³/s

We take an overall volumetric balance for the system

The rate of change of the system's volume = (Rate of flow of water into the storage tank) - (Rate of flow of water out of the storage tank)

(dV/dt) = Fᵢ - F

V = Ah (since A is constant)

dV/dt = (d/dt) (Ah) = A (dh/dt)

dV/dt = A (dh/dt) = Fᵢ - F

Divide through by A

dh/dt = (Fᵢ - F)/A

Fi = 0.0315 m³/s

F = 0.0371 m³/s

A = Cross sectional Area of the storage tank = πD²/4

D = 10 ft = 3.048 m

A = π(3.048)²/4 = 7.30 m²

(dh/dt) = (0.0315 - 0.0370)/7.3 = - 0.000753

(dh/dt) = - 0.000753

4 0
3 years ago
Airflow through a long, 0.15-m-square air conditioning duct maintains the outer duct surface temperature at 10°C. If the horizon
Ulleksa [173]

The complete Question is:

Airflow through a long, 0.15-m-square air conditioning duct maintains the outer duct surface temperature at 10°C. If the horizontal duct is uninsulated and exposed to air at 35°C in the crawlspace beneath a home, what is the heat gain per unit length of the duct? Evaluate the properties of air at 300 K. For the sides of the duct, use the more accurate Churchill and Chu correlations for laminar flow on vertical plates.

What is the Rayleigh number for free convection on the outer sides of the duct?

What is the free convection heat transfer coefficient on the outer sides of the duct, in W/m2·K?

What is the Rayleigh number for free convection on the top of the duct?  

What is the free convection heat transfer coefficient on the top of the duct, in W/m2·K?

What is the free convection heat transfer coefficient on the bottom of the duct, in W/m2·K?

What is the total heat gain to the duct per unit length, in W/m?

Answers:

- 7709251  or 7.709 ×10⁶

- 4.87

- 965073

- 5.931 W/m² K

- 2.868 W/m² K

- 69.498 W/m

Explanation:

Find the given attachments for complete explanation

4 0
3 years ago
Other questions:
  • What is the heights part of Maine?
    5·1 answer
  • A parison is extruded from a die with outside diameter = 11.5 mm and inside diameter = 7.5 mm. The observed die swell = 1.25. Th
    8·1 answer
  • The component of a fluid system where a fluid is stored, but not under pressure, is called a container.
    5·1 answer
  • A water jet strikes normal to a fixed plate. If diameter of the outlet of the nozzle is 8 cm,and velocity of water at the outlet
    11·1 answer
  • What material property would still cause strain in a strain gauge that is positionedperpendicular to the direction of force if i
    6·1 answer
  • A simple ideal Rankine cycle with water as the working fluid operates between the pressure limits of 4 MPa in the boiler and 20
    12·1 answer
  • When you do a vehicle check, what do you NOT need to keep an eye on?
    9·1 answer
  • A fair die is thrown, What is the probability gained if you are told that 4 will
    12·1 answer
  • I wuv little space :)
    8·1 answer
  • The only way to know if a design will work in real-world conditions is to build a model, or prototype, based on the plan. This i
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!