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
I need solution for this question please ​
AlladinOne [14]

Answer:

a true b false thos is the solution

6 0
3 years ago
Read 2 more answers
____ grinders are used to grind diameters, shoulders, and faces much like the lathe is used for turning, facing, and boring oper
skelet666 [1.2K]

Answer:

Cylindrical

Explanation:

<em>A cylindrical grinder </em><em>is a tool for shaping the exterior of an item. Although cylindrical grinders may produce a wide range of forms, the item must have a central axis of rotation. Shapes such as cylinders, ellipses, cams, and crankshafts are examples of this.</em><em> Cylindrical grinding</em><em> machines are specialized grinding machines that are used to process cylinders, rods, and similar workpieces. The cylinders revolve in one direction between two centers, while the grinding wheel or wheels are close together and rotate in the other direction.</em>

8 0
1 year ago
technician A says that in any circuit, electrical current takes the path of least resistance. technician B says that while this
ArbitrLikvidat [17]

Answer:

  technician A is correct

Explanation:

Technician B has circuit topologies confused. In a series circuit, there is only one path for electrical current to take. In a parallel circuit, the current will divide between paths in proportion to the inverse of their resistance. The least resistance path will have the most current.

Technician A is mostly correct.

3 0
3 years ago
Why do engineers need to be particularly aware of the impact of hubris?
miv72 [106K]

Answer:

A) Their creations change society.

7 0
2 years ago
If a hoist lifts a 4500lb load 30ft in 15s, the power delivered to the load is a) 18.00hp b) 9000hp c) 16.36hp d) None of the ab
12345 [234]

Answer:

Explanation:

load = 4500lb                   lift height= 30 ft

time =15 s

velocity=\frac{30}{15} ft/s

velocity=2 ft/s

power = force\times velocity

power={4500}\times2

power= 9000 lb ft/s

1 hp= 550 lb ft/s

power= \frac{9000}{550} =16.36 hp

5 0
3 years ago
Other questions:
  • Define various optical properties of engineering materials
    11·1 answer
  • 5. A non-cold-worked brass specimen of average grain size 0.01 mm has a yield strength of 150 MPa. Estimate the yield strength o
    10·1 answer
  • The price of a single item within a group of items is
    8·1 answer
  • A square isothermal chip is of width w 5 mm on a side and is mounted in a substrate such that its side and back surfaces are wel
    11·1 answer
  • In a certain balanced three phase system each line current is a 5a and each line voltage is 220v . What is the approximate real
    15·1 answer
  • Practice finding the volume of a sphere.
    10·2 answers
  • In homes today, what is behind the reason for flashover fires occurring much more rapidly than in the past generations?
    8·1 answer
  • Which step in the engineering design phase is requiring concussion prevention from blows up to 40 mph an example of?
    6·1 answer
  • 8th grade safety test
    9·1 answer
  • What are the horizontal structures beneath a slab that help transfer the load from the slab to the columns?
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!