The total nuclear binding energy is the energy required to split a nucleus of an atom in its component parts: protons and neutrons, or, collectively, the nucleons. It describes how strongly nucleons are bound to each other. When a high amount of energy is needed to separate the nucleons, it means nucleus is very stable and the neutrons and protons are tightly bound to each other. The atomic number or proton number (symbol Z) is the number of protons found in the nucleus of an atom. The sum of the atomic number Z and the number of neutrons N gives the mass number A of an atom. The approximate nuclear binding energy Eb in million electron volts, of an atomic nucleus with atomic number Z and mass number A is calculated using the following formula: Eb = ((a1*A) - (a2*(A**2/3)) - (a3*(Z**2/A**1/3)) - (a4*(((A-2Z)**2)/A )) + (a5/(A**1/2))) where, a1 = 15.67, a2 = 17.23,  a3 = 0.75,  a4 = 93.2 and  a5 = 0 if A is odd  Or a5 = 12 if A and Z are both even  Or a5 = -12 if A is even and Z is odd  The binding energy per nucleon (BEN) is calculated by dividing the binding energy (Eb) by the mass number (A). You are asked to write a program that requests the user for a valid atomic number (Z) then goes through all values of A from A = Z to A = 4Z. For example, if the user inputs 5 for Z then A will be all numbers from 5 (Z) to 20 (4 * Z) inclusive, see the example output in figure 2. If the user enters invalid atomic number that is not between 1 and 118, the program should give the user another chance to enter a valid input as shown in figure 2. Your main task is to find the nucleus with the highest binding energy per nucleon, which corresponds to the most stable configuration (figure 2), and writes a copy of the table to a text file named output.txt (figure3). Your program should be modular and consists of the following functions: a) read(): - Ask the user for a valid atomic number (Z) b) compute_binding_energy(Z, table): - Build the table (a list of lists) of binding energy where the columns are: the mass number (A), the binding energy (Eb) and the binding energy per nucleon (BEN), while the rows range from A = Z to A = 4Z c) most_stable(table) : - Find and return the row that contains the highest binding energy per nucleon, which corresponds to the most stable configuration. d) print_table(table): - Print the table in a neat tabular format as shown in the sample run in figure 2. e) write_to_file(table, file_name): - Save the table in a text file output.txt as shown in figure 3.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

The total nuclear binding energy is the energy required to split a nucleus of an
atom in its component parts: protons and neutrons, or, collectively, the nucleons.
It describes how strongly nucleons are bound to each other. When a high amount
of energy is needed to separate the nucleons, it means nucleus is very stable
and the neutrons and protons are tightly bound to each other.
The atomic number or proton number (symbol Z) is the number of protons found
in the nucleus of an atom. The sum of the atomic number Z and the number of
neutrons N gives the mass number A of an atom.

The approximate nuclear binding energy Eb in million electron volts, of an atomic
nucleus with atomic number Z and mass number A is calculated using the
following formula:

Eb = ((a1*A) - (a2*(A**2/3)) - (a3*(Z**2/A**1/3)) - (a4*(((A-2Z)**2)/A )) + (a5/(A**1/2)))

where, a1 = 15.67, a2 = 17.23,  a3 = 0.75,  a4 = 93.2 and 

a5 = 0 if A is odd 

Or

a5 = 12 if A and Z are both even 

Or

a5 = -12 if A is even and Z is odd 

The binding energy per nucleon (BEN) is calculated by dividing the binding
energy (Eb) by the mass number (A).
You are asked to write a program that requests the user for a valid atomic
number (Z) then goes through all values of A from A = Z to A = 4Z. For example,
if the user inputs 5 for Z then A will be all numbers from 5 (Z) to 20 (4 * Z)
inclusive, see the example output in figure 2.
If the user enters invalid atomic number that is not between 1 and 118, the
program should give the user another chance to enter a valid input as shown in
figure 2.
Your main task is to find the nucleus with the highest binding energy per nucleon,
which corresponds to the most stable configuration (figure 2), and writes a copy
of the table to a text file named output.txt (figure3).

Your program should be modular and consists of the following functions:
a) read():
- Ask the user for a valid atomic number (Z)
b) compute_binding_energy(Z, table):
- Build the table (a list of lists) of binding energy where the columns are:
the mass number (A), the binding energy (Eb) and the binding energy per
nucleon (BEN), while the rows range from A = Z to A = 4Z

c) most_stable(table) :
- Find and return the row that contains the highest binding energy per
nucleon, which corresponds to the most stable configuration.
d) print_table(table):
- Print the table in a neat tabular format as shown in the sample run in
figure 2.
e) write_to_file(table, file_name):
- Save the table in a text file output.txt as shown in figure 3.

The approximate nuclear binding energy Eb in million electron volts, of an atomic
nucleus with atomic number Z and mass number A is calculated using the
following formula:
Eb = a,A – a,A3
- az 1
A3
(А — 22)? аs
as
A
where, a, = 15.67, az = 17.23, az = 0.75, a4
93.2 ,and
1
Weights: 6%
2 If you fail to name your file correctly you will loose marks, see grading table. Make sure submit the py file.
Submit well ahead of the deadline to avoid possible Internet congestion and other connection problems.
1
if A is odd
if A and Z are both even
if A is even and Z is Odd
as =
12.0
-12.0
Transcribed Image Text:The approximate nuclear binding energy Eb in million electron volts, of an atomic nucleus with atomic number Z and mass number A is calculated using the following formula: Eb = a,A – a,A3 - az 1 A3 (А — 22)? аs as A where, a, = 15.67, az = 17.23, az = 0.75, a4 93.2 ,and 1 Weights: 6% 2 If you fail to name your file correctly you will loose marks, see grading table. Make sure submit the py file. Submit well ahead of the deadline to avoid possible Internet congestion and other connection problems. 1 if A is odd if A and Z are both even if A is even and Z is Odd as = 12.0 -12.0
In (2511 runfilel users/hanzazidoun/Documents/2181/2101_52021/
Progranming Assignments/PA/oel_nuclear.py', wdire'/Users/hanzazidoum/
Dacunents/2101/2ie1_s2821/Progranning Assignments/PAA")
ostnter valid stonic nunber (z) (1,11l: e
Enter valid atomic nunber (Z) (1,1181: -120
Enter valid atonic nunber (2) (1,118]: 280
otnter valid atonic nunber (2) (1,11): 3
binding
energy
binding energy
per Nucleon
A
-448.99
-226.623
-82.990
-3.7
47.111
64, 228
78.245
55.e0
35.952
-19. 799
-37.771
-11.856
-8.472
5.235
6.423
6.386
4.584
2.746
0.128
-2.179
-4.927
-1.262
-9.869
-12.019
6
7
18
11
12
13
14
15
16
1.704
-32.682
-78.825
-123.453
-177.641
-229.307
17
18
-200.143
-14. 457
The most stable nucleus has a mass nunber 10
Figure 2: Sample run of the propram
2
output.bxt
binding
energy
binding, energy
per Nucleon
-440.906
-226.423
-82,990
-3.778
-00. 799
-37.771
-11.856
-0.472
17
la
47.111
64.228
70.245
55.009
35.952
1.794
-32.62
5.235
11
12
13
14
15
16
17
18
19
20
6.423
6.386
4. sa4
2,766
.126
-2.179
-4.927
-7.262
-9.869
-12.069
-14.457
-78. 825
-123.453
-177.641
-229.307
-289.143
Figure 3: Output File
Transcribed Image Text:In (2511 runfilel users/hanzazidoun/Documents/2181/2101_52021/ Progranming Assignments/PA/oel_nuclear.py', wdire'/Users/hanzazidoum/ Dacunents/2101/2ie1_s2821/Progranning Assignments/PAA") ostnter valid stonic nunber (z) (1,11l: e Enter valid atomic nunber (Z) (1,1181: -120 Enter valid atonic nunber (2) (1,118]: 280 otnter valid atonic nunber (2) (1,11): 3 binding energy binding energy per Nucleon A -448.99 -226.623 -82.990 -3.7 47.111 64, 228 78.245 55.e0 35.952 -19. 799 -37.771 -11.856 -8.472 5.235 6.423 6.386 4.584 2.746 0.128 -2.179 -4.927 -1.262 -9.869 -12.019 6 7 18 11 12 13 14 15 16 1.704 -32.682 -78.825 -123.453 -177.641 -229.307 17 18 -200.143 -14. 457 The most stable nucleus has a mass nunber 10 Figure 2: Sample run of the propram 2 output.bxt binding energy binding, energy per Nucleon -440.906 -226.423 -82,990 -3.778 -00. 799 -37.771 -11.856 -0.472 17 la 47.111 64.228 70.245 55.009 35.952 1.794 -32.62 5.235 11 12 13 14 15 16 17 18 19 20 6.423 6.386 4. sa4 2,766 .126 -2.179 -4.927 -7.262 -9.869 -12.069 -14.457 -78. 825 -123.453 -177.641 -229.307 -289.143 Figure 3: Output File
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 4 images

Blurred answer
Knowledge Booster
Problems on Dynamic Programming
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education