The first 10 elements of the periodic table and some of their properties can be found...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
The first 10 elements of the periodic table and some of their properties can be found in Table 2 These elements can be combined to create molecules. For example, two hydrogen atoms (2H) can be added to an oxygen (O) atom to create a water molecule (H₂O). This combination can be written as 2H + 10 → H₂O₁ (or more commonly H₂O). Write a Python program that can add elements together. Your program should: 1. Ask the user to enter a string of the form xA+yB + C + ..., where x, y, and z are positive integers (called stoichiometric coefficients) and A, B, and C are distinct symbols of elements. Examples include 2H + 10 and 1C + 20. The user should be asked to enter the string again if a stiochiometric coefficient is not a positive integer, or if a symbol does not match any of the elements in Table 2. The formula for the molecule should then be printed to the screen as AxByCz (e.g. C2H4). If any of the stoichiometric coefficients are 1, then they should not be printed (e.g. H201 should be H2O, C102 should be CO2). 2. Calculates the atomic mass of the molecule. The atomic mass of a molecule is equal to the sum of the atomic masses of each element present in the molecule multiplied by the stoichiometric coefficient for that element. This value should be printed to the screen. Table 2: The first 10 elements of the periodic table. Symbol Atomic mass H He Element Hydrogen Helium Lithium Li Beryllium Be Boron B Carbon C Nitrogen N Oxygen Fluorine Neon F Ne 1 4 7 9 11 12 14 16 19 20 The first 10 elements of the periodic table and some of their properties can be found in Table 2 These elements can be combined to create molecules. For example, two hydrogen atoms (2H) can be added to an oxygen (O) atom to create a water molecule (H₂O). This combination can be written as 2H + 10 → H₂O₁ (or more commonly H₂O). Write a Python program that can add elements together. Your program should: 1. Ask the user to enter a string of the form xA+yB + C + ..., where x, y, and z are positive integers (called stoichiometric coefficients) and A, B, and C are distinct symbols of elements. Examples include 2H + 10 and 1C + 20. The user should be asked to enter the string again if a stiochiometric coefficient is not a positive integer, or if a symbol does not match any of the elements in Table 2. The formula for the molecule should then be printed to the screen as AxByCz (e.g. C2H4). If any of the stoichiometric coefficients are 1, then they should not be printed (e.g. H201 should be H2O, C102 should be CO2). 2. Calculates the atomic mass of the molecule. The atomic mass of a molecule is equal to the sum of the atomic masses of each element present in the molecule multiplied by the stoichiometric coefficient for that element. This value should be printed to the screen. Table 2: The first 10 elements of the periodic table. Symbol Atomic mass H He Element Hydrogen Helium Lithium Li Beryllium Be Boron B Carbon C Nitrogen N Oxygen Fluorine Neon F Ne 1 4 7 9 11 12 14 16 19 20
Expert Answer:
Related Book For
Understanding Financial Statements
ISBN: 978-0133874037
11th edition
Authors: Lyn Fraser, Aileen Ormiston
Posted Date:
Students also viewed these programming questions
-
In Problems 19-22, the limit can be found in two ways. Use L'Hopital's rule to find the limit and check your answer using an algebraic simplification. 20. 22. i 25 lim x6x 91
-
In Problems 21-24, the integral can be found in more than one way. First use integration by parts, then use a method that does not involve integration by parts. Which method do you prefer. (x + 2)(x...
-
In Problems 21-24, the integral can be found in more than one way. First use integration by parts, then use a method that does not involve integration by parts. Which method do you prefer. (5x 1 + 2)...
-
answer the following questions about the countries below using CIA factbook Economic Systems Continuum Activity: Country Information Cards Answer the following questions about the countries below...
-
Because of their unique expertise with explosives, the Zambino brothers have long enjoyed a monopoly of the U. S. market for public fireworks displays for crowds above a quarter of a million. The...
-
Consider the element \(\mathrm{O}\) (oxygen). Write down the LS and \(j j\) couplings for the electrons, and show explicitly that the splitting of energy levels is the same for each type of coupling.
-
Consider the following cash flow profile, and assume MARR is 10 percent/year and the finance rate is 4 percent/year. a. Determine the MIRR for this project. b. Is this project economically...
-
Tuscany Statuary manufactures bust statues of famous historical figures. All statues are the same size. Each unit requires the same amount of resources. The following information is from the static...
-
Explain how the relative prices of rugs and robots in autarky compare with the relative prices when Canada and India start to trade? In your answer explain which country will export/import which...
-
What test can be performed to compare the breast cancer incidence rate between the ¥ 30.0g group and the 0g group? Cancer A paper was recently published concerning the association between alcohol...
-
Can you help me find that information for Subway (the food company) ? The Insight stage, builds from introspection from the leader -" what is" then the individual team members finish by how they...
-
This litigation involves a dispute between Shell Oil Company (Shell), a petroleum franchisor, and several Shell franchisees in Massachusetts. Pursuant to their franchise agreements with Shell, each...
-
Discuss the sampling strategy and technique used to access the appropriate sample. Develop a hypothetical research scenario that would necessitate the use of a 3-Factor Crossover Design. The research...
-
Assuming the dispersion relation \(\omega=A k^{\mathcal{s}}\), where \(\omega\) is the angular frequency and \(k\) the wave number of a vibrational mode existing in a solid, show that the respective...
-
Label each of the following statements true, false, or uncertain. Explain briefly. a. The reduction in the current account deficit in Greece from 2008 to 2018 means that citizens in Greece are better...
-
A relatively small medical group practice is trying to estimate its CCC. The practice is 100 percent equity financed. The rate of return on 20-year Treasury bonds is currently 4 percent, and the...
-
Please complete these problems to the best of your ability and submit your solutions on Canvas by 11:59pm (EDT) on Saturday, July 1. There are (25) total points available in this problem set. 1....
-
What is an insurable interest? Why is it important?
-
The 2013 Intel Form 10-K can be found at the following Web site: www.pearsonhighered.com/fraser. (a) Using the consolidated statements of operations, analyze the profitability of Intel by preparing a...
-
Tucker's Technology had the following goods available for sale in the last accounting period: Beginning inventory ..........................................100 units @ $ 5 Purchases (in order from...
-
Sage Inc.'s staff of accountants finished preparing the financial statements for 2016 and will meet next week with the company's CEO as well as the Director of Investor Relations and representatives...
-
For the three-room house shown in Figure 7.35, all rooms are perfect squares and have the same dimensions. An air conditioner produces an equal amount of heat flow \(q_{\mathrm{ho}}\) out of each...
-
Figure 7.18 shows a liquid-level system in which two tanks have cross-sectional areas \(A_{1}\) and \(A_{2}\), respectively. The volume flow rate into tank 1 is \(q_{\mathrm{i}}\). A pump is...
-
Consider the single-tank liquid-level system shown in Figure 7.19, where the volume flow rate into the tank through a pipe is \(q_{\mathrm{i}}\). The liquid leaves the tank through an orifice of area...
Study smarter with the SolutionInn App