1. Create a Python source file named ex3_1.py that will include the following two lines. Be...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1. Create a Python source file named "ex3_1.py" that will include the following two lines. Be sure to replace [YourName Here] with your full name. #Student: Your Name Here # Programming Exercise: 3_1 2. Next to the above two lines, write Python codes that will display a message, such as "Enter the number of mass of silicon in gram: ", store the user input in variable of "float" type, and then use the following information to create calculate the total number of silicon atoms in that given sample. Display another message, such as "This sample has m of silicon atoms", where m is the value of the calculated result. • The atomic mass of Si (silicon) is 28.09u (or 28.09 g/mol). Avogadro's constant is 6.022×10 per mole. To find how many atoms are in a sample of silicon that has a mass of ng is: 12 atomic mass X Avogadro's constant 3. A sample output will look similar to the following: Input Box Enter the number of mass of silicon in gram: 45.23 X OK Message Box X This sample has 9.696513349946599e+23 of silicon atoms. 4. Download the "programming exercise template", and then rename it to ex3.doc. Copy and paste the source code to the template. Capture a screen shot similar to Fig. ex3 and paste it to a Microsoft Word document named ex3.doc (or ex3.docx). [Feel free to convert the Word document to a .pdf file.] 1. Create a Python source file named "ex3_1.py" that will include the following two lines. Be sure to replace [YourName Here] with your full name. #Student: Your Name Here # Programming Exercise: 3_1 2. Next to the above two lines, write Python codes that will display a message, such as "Enter the number of mass of silicon in gram: ", store the user input in variable of "float" type, and then use the following information to create calculate the total number of silicon atoms in that given sample. Display another message, such as "This sample has m of silicon atoms", where m is the value of the calculated result. • The atomic mass of Si (silicon) is 28.09u (or 28.09 g/mol). Avogadro's constant is 6.022×10 per mole. To find how many atoms are in a sample of silicon that has a mass of ng is: 12 atomic mass X Avogadro's constant 3. A sample output will look similar to the following: Input Box Enter the number of mass of silicon in gram: 45.23 X OK Message Box X This sample has 9.696513349946599e+23 of silicon atoms. 4. Download the "programming exercise template", and then rename it to ex3.doc. Copy and paste the source code to the template. Capture a screen shot similar to Fig. ex3 and paste it to a Microsoft Word document named ex3.doc (or ex3.docx). [Feel free to convert the Word document to a .pdf file.]
Expert Answer:
Answer rating: 100% (QA)
In Python the standard library for graphical user interfaces GUIs is tkinter We can use tkinter to create a dialog box for your program Below is the p... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
What is zealous advocacy? Even though zealous advocacy should be strived for by every lawyer, What are some reasons why a lawyer would choose not to represent a client? Talk about things like...
-
BACKGROUND You are an information analyst working for NEE. The company president has asked you to prepare a Quantitative analysis of financial, sales, and operations data to help determine which...
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
Exercises 5-8: Sort the list of numbers from smallest to largest and display the result in a table. (a) Determine the maximum and minimum values. (b) Calculate the mean and median. Round each result...
-
A band belt is used to control the speed of a flywheel as shown. Determine the magnitude of the couple being applied to the flywheel knowing that the coefficient of kinetic friction between the belt...
-
Two income statements for Upward Company follow: a. Prepare a vertical analysis of Upward Companys income statements. b. Does the vertical analysis indicate a favorable or an unfavorable Change?...
-
An article in the Journal of Pharmaceutical Sciences \((\mathbf{8 0}, 971-977,1991)\) presents data on the observed mole fraction solubility of a solute at a constant temperature, along with...
-
Universal Chemical Company uses oil to produce two types of plastic products, P1 and P2. Universal budgeted 30,300 barrels of oil for purchase in April for $68 per barrel. Direct labor budgeted in...
-
Zama CC acquired Machine A ( a second - hand machine ) for R 2 0 0 0 0 0 0 and brought it into use in its manufacturing process on 1 0 January 2 0 1 7 . Zama CC acquired a new manufacturing machine B...
-
Identify the issue in the following two fact situations. Part A Beth loaned Allen $5,000. The agreement was oral. Allen commutes to a nearby city to work. Beth needs to go to the city three times in...
-
Information Security Retrieval and Awareness (ISRA) model can be used by industry to enhance information security awareness among employees. A common body of knowledge for information security that...
-
A house is on sale in Markham. Marlene has an option to pay $575000 lump sum or pay $6000 at the end of every month for the next 10 years. If money earns 5% compounded monthly, which option has a...
-
Use the accompanying sinking fund formula to determine the payment needed to reach the accumulated amount. Monthly payments with 5% interest are compounded monthly for 22 years to accumulate $510,000.
-
Consider the following where you have 3 bonds for your portfolio. Bond A has face value of $1,000, coupon rate of 4%, and years held of 3 years. Bond B has face value of $1,000, coupon rate of 6%,...
-
Tracking Expenses With Budgeting View this video to gain additional insight about tracking expenses. As you listen, consider why it is important for you to track your expenses. An essential component...
-
Use the basic accounting equation to answer these questions. (a) The liabilities of Lantz Company are $90,000 and the stockholders' equity is $230,000. What is the amount of Lantz's total assets?...
-
How is the Keynesian Multiplier calculated? What is the primary assumption behind the 20 multiplier effect? C + I + G + (X-M) = GDP = AI = C + S + (T- R) (a) What is the change in Aggregate Income...
-
Could a set of three vectors in span all of? Explain. What about n vectors in when n is less than m? R4
-
Teresa is a civil engineer who uses her automobile for business. Teresa drove her automobile a total of 21,732 miles during 2012, of which 95 percent was business mileage. The actual cost of...
-
Yolanda earns $112,000 in 2012. Calculate the FICA tax that must be paid by: Yolanda:.....................Soc.Sec..................$__________...
-
Frank, age 35, and Joyce, age 34, are married and file a joint income tax return for 2012. Their salaries for the year total $83,000 and they have taxable interest income of $4,000. They have no...
-
Name three or more branches of Earth science, and describe the focus of each.
-
How does seafloor spreading relate to continental drift?
-
Describe how tectonic plates move in terms of speed and direction.
Study smarter with the SolutionInn App