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
An engineer is trying to build a new measurement tool. Which step should the engineer complete first? A. Design a model of the t
JulijaS [17]

Answer:

B. Precisely define the problem that is to be solved.

Explanation:

Engineering can be defined as the scientific and technological principles that is used for the design, development, operation and control of tools, machines or equipments, structures and systems. These machines, tools, systems and structures are typically designed and developed for the purpose of solving peculiar problems relating to human life. Simply stated, engineering is focused on proffering solutions to real life problems through a design process.

<em>Generally, the design process comprises of series of steps used for the development of various tools, machines, structures and systems. In a chronological order, the basic steps of a design process are;</em>

1. Define the problem: to proffer a solution to any problem, you have to precisely define the problem that is to be solved. Therefore, this is the first step of the design process.

2. Conduct a research: the engineer should collect or gather data (informations) relating to the project.

3. Brainstorming and analysis of data: this is the stage where the engineer conceptualize his or her ideas.

4. Create a prototype or simulated model of the product.

5. Product analytics and test: this is where the product is being used and tested for any flaw, error or defects. Thus, troubleshooting is also required at this stage.

<em>Hence, if an engineer is trying to build a new measurement tool; the first step the engineer should complete is to precisely define the problem that is to be solved so as to have a good clear-cut understanding of the problem. </em>

8 0
3 years ago
Convection ovens operate on the principle of inducing forced convection inside the oven chamber with a fan. A small cake is to b
svetlana [45]

complete question:

attached

Answer:

2356.11 W/m^2

6100.11 W/m^2

Explanation:

Assumptions:

1. Steady-state conditions.

2. The cake is placed in a large surrounding.

3. Heat flux delivered to the cake is due to convection and radiation.  

Case 1

Since convection feature is disabled the mode of heat transfer associated with this situation is through free convection and radiation.  

q''(free) = [q''(free convection+q''(radiation) ]W/m^2

            = h_free(T_infinty - T_i) + εσ(T_air^4 - T_i^4)

            = 3 W/m^2K(180°C - 24°C) + 0.97*5.67*10^-8*[(180+273K)^4 -  

               (24+273K)^4 ]

            = 468 +1881.11

            = 2356.11 W/m^2

Case 2

Since convection feature is enabled or activated the mode of heat transfer associated with this situation is through forced convection and radiation.  

q''(free) = [q''(forced convection+q''(radiation) ]W/m^2

            = h_forced(T_infinty - T_i) + εσ(T_air^4 - T_i^4)

            = 27 W/m^2K(180°C - 24°C) + 0.97*5.67*10^-8*[(180+273K)^4 -  

               (24+273K)^4 ]

            = 4212 +1881.11

            = 6100.11 W/m^2

1. The total heat flux is is 2.58 times higher when the convection feature is activated. Therefore the cake will bake faster during this condition.  

2. The contribution of convection heat flux under natural(free) convection is very low as compared to the contribution during forced convection.  

3. The heat transfer due to radiation is same in both the cases.  

4. Only 19.9 % of the total heat flux is contributed by free convection in the first case.  

5. In the second case 69 % of the total heat flux is contributed by forced convection.  

5 0
3 years ago
What is the IMA of a fixed pulley ​
Amanda [17]

Answer:

Not sure

Explanation:

Looking now

4 0
3 years ago
Read 2 more answers
A manufacturer makes two types of drinking straws: one with a square cross-sectional shape, and the other type the typical round
Harlamova29_29 [7]

Answer:

\frac{Q_{square}}{Q_{circle}} =  0.785  

Explanation:

given data

types of drinking straws

  1. square cross-sectional shape
  2. round shape

solution

we know that both perimeter of the cross section are equal

so we can say that

perimeter of square  = perimeter of circle  

4 × S = π × D

here S is length and D is diameter

S = \frac{\pi D}{4}        ....................1

and

ratio of  flow rate through the square and circle is here

\frac{Q_{square}}{Q_{circle}} = \frac{AV^2}{AV^2}  

\frac{Q_{square}}{Q_{circle}} = \frac{S^2}{\frac{\pi D^2}{4}}  

\frac{Q_{square}}{Q_{circle}} = \frac{(\frac{\pi D}{4})^2}{\frac{\pi D^2}{4}}  

\frac{Q_{square}}{Q_{circle}} = \frac{\pi }{4}  

\frac{Q_{square}}{Q_{circle}} =  0.785  

4 0
3 years ago
If a front gear had 24 teeth, and a rear gear has 12 teeth:
zubka84 [21]

Answer:

  4 times around

Explanation:

The total number of teeth involved will be the same for each gear. If the front gear is connected to the pedal and it goes around twice, then 2·24 = 48 teeth will have passed the reference point.

If the rear gear is attached to the wheel, and 48 teeth pass the reference point, then it will have made ...

  (48 teeth)/(12 teeth/turn) = 4 turns

4 0
2 years ago
Other questions:
  • To ensure safe footing on penetrable surfaces,use?
    5·1 answer
  • Two AAA-size lithium batteries are connected in series in a flashlight. Each battery has 3.5 volt and 4- Amp-hour capacity. If t
    8·1 answer
  • 6. PVC boxes are primarily used in new construction because it is simple to
    11·1 answer
  • 14. Tires are rotated to
    12·2 answers
  • Why does an aeroplane smoke in the air​
    14·1 answer
  • The use of zeroes after a decimal point are an indicator of accuracy. a)True b)- False
    7·1 answer
  • - If you overload the rear portion of you vehicle &amp; it's raining out, your car could easily:
    14·1 answer
  • This app, I'm done, bye... I can't, bye
    11·1 answer
  • Calculate the percentage of recyclables in high socioeconomic localities.
    13·1 answer
  • Use the drop-down menus to complete the statements about using OneNote in Outlook meeting requests.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!