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
____ 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
2 years ago
A 1-kW electric resistance heater submerged in 10-kg water is turned on and kept on for 15 min. During the process, 400 kJ of he
hichkok12 [17]

Answer:

ΔT=  11.94 °C

Explanation:

Given that

mass of water = 10 kh

Time t= 15 min

Heat lot from water = 400  KJ

Heat input to the water = 1  KW

Heat input the water= 1 x 15 x 60

                                =900 KJ

By heat balancing

Heat supply - heat rejected = Heat gain by water

As we know that heat capacity of water

C_p=4.187 \frac{KJ}{kg-K}

Q=mC_p\Delta T

Now by putting the values

900 - 400 = 10 x 4.187 x ΔT

So  rise in temperature of water ΔT=  11.94 °C

6 0
3 years ago
Market research is a good place to start the design process and usually involves asking questions about consumers.
ElenaW [278]
what is your question?
4 0
2 years ago
If an imbalance occurs, the _
pochemuha

A. AFGI is the answer for this question.

7 0
3 years ago
The annual inventory cost C for a manufacturer is given below, where Q is the order size when the inventory is replenished. Find
Nataly_w [17]

The change in annual cost when Q is increased from 340 to 341 is -1.23 and the instantaneous rate of change when Q = 340 is -1.25

<h3>How to find the Instantaneous rate of change?</h3>

The annual inventory cost C for a manufacturer is given as;

C = (1012000/Q) + 7.5Q

where Q is the order size when the inventory is replenished.

Now, the change in C can be calculated by evaluating the cost function at Q = 340 and Q = 341

Change in C = [1,012,000/341 + 7.5*341] - [1,012,000/340 + 7.5*340] ≈ -1.23

Instantaneous rate of change in C is first order derivative C':

C'(Q) = -1,012,000/(Q²) + 7.5

C'(340) = -1,012,000/(340²) + 7.5 ≈ -1.25

Read more about Instantaneous rate of change at; brainly.com/question/14666106

#SPJ1

8 0
1 year ago
Other questions:
  • Consider a single crystal of some hypothetical metal that has the BCC crystal structure and is oriented such that a tensile stre
    10·1 answer
  • ¿Por qué creen que la Ingeniería Metalúrgica es una carrera estratégica para el desarrollo de nuestro país?
    9·1 answer
  • 1. Looking at the case study provided under the Companion Material section, what is the main problem that is addressed in this c
    13·1 answer
  • Calculate the resistance using Voltage and current, again using voltage and power, again using current and power, and again usin
    12·1 answer
  • The products of combustion from a burner are routed to an industrial application through a thin-walled metallic duct of diameter
    11·1 answer
  • The conditions at the beginning of compression in an Otto engine operating on hot-air standard with k=1.35 and 101.325 kPa, 0.05
    10·1 answer
  • Define ways in which you would go about networking to explore opportunities in your career field and obtain more information for
    11·1 answer
  • Name the ferrous metal that most workshop tools are made from??
    12·2 answers
  • When could you use the engineering design process in your own life?
    9·1 answer
  • if when you put your shirt in your pants, your shirt is tucked, does that mean when your shirt is over your pants, your pants ar
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!