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. + Binding energy Separated nucleons (greater mass) Nucleus (smaller mass) Figure 1: Binding Energy in the Nucleus 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: (А — 22)2 2 Eb = a,A – A,A3 – az¬-a4 as ャイ A Аз AZ where, a, = 15.67, a2 = 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 a5 = 12.0 -12.0 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). In [25]: runfile('/Users/hamzazidoum/Documents/2101/2101_S2021/ Programming Assignments/PA4/pa4_nuclear.py', wdir='/Users/hamzazidoum/ Documents/2101/2101_s2021/Programming Assignments/PA4') >>>Enter valid atomic number (Z) [1,118]: 0 >>>Enter valid atomic number (Z) [1,118]: -120 >>>Enter valid atomic number (Z) [1,118]: 200 >>>Enter valid atomic number (Z) [1,118]: 5 A binding energy binding energy per Nucleon -448.996 -226.623 -82.990 -3.778 47.111 64.228 70.245 55.009 35.952 1.794 -32.682 -78.825 -123.453 -177.641 -229.307 -289.143 -89.799 -37.771 -11.856 -0.472 5.235 6.423 6.386 4.584 2.766 0.128 -2.179 10 11 12 14 15 16 -4.927 -7.262 -9.869 19 20 -14.457

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
1. Problem Description:
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.
+ Binding energy
Separated nucleons
(greater mass)
Nucleus
(smaller mass)
Figure 1: Binding Energy in the Nucleus
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:
(А — 2Z)2
Z2
a4
- az 1
Аз
a5
Eb = a,A – a,AS
A
AZ
where, a1 =
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
a5 =
12.0
–12.0
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).
In [25]: runfile('/Users/hamzazidoum/Documents/2101/2101_s2021/
Programming Assignments/PA4/pa4_nuclear. py', wdir='/Users/hamzazidoum/
Documents/2101/2101_S2021/Programming Assignments/PA4')
>>>Enter valid atomic number (Z) [1,118]: 0
>>>Enter valid atomic number (Z) [1,118]: -120
>>>Enter valid atomic number (Z) [1,118]: 200
>>>Enter valid atomic number (Z) [1,118]: 5
binding
energy
binding_ energy
per Nucleon
A
-448.996
-226.623
-82.990
-3.778
47.111
64.228
70.245
55.009
35.952
1.794
-32.682
-78.825
-123.453
-177.641
-229.307
-289.143
7
8
9
10
11
12
13
-89.799
-37.771
-11.856
-0.472
5.235
6.423
6.386
4.584
2.766
0.128
-2.179
-4.927
-7.262
-9.869
17
18
19
20
-14.457
Transcribed Image Text:1. Problem Description: 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. + Binding energy Separated nucleons (greater mass) Nucleus (smaller mass) Figure 1: Binding Energy in the Nucleus 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: (А — 2Z)2 Z2 a4 - az 1 Аз a5 Eb = a,A – a,AS A AZ where, a1 = 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 a5 = 12.0 –12.0 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). In [25]: runfile('/Users/hamzazidoum/Documents/2101/2101_s2021/ Programming Assignments/PA4/pa4_nuclear. py', wdir='/Users/hamzazidoum/ Documents/2101/2101_S2021/Programming Assignments/PA4') >>>Enter valid atomic number (Z) [1,118]: 0 >>>Enter valid atomic number (Z) [1,118]: -120 >>>Enter valid atomic number (Z) [1,118]: 200 >>>Enter valid atomic number (Z) [1,118]: 5 binding energy binding_ energy per Nucleon A -448.996 -226.623 -82.990 -3.778 47.111 64.228 70.245 55.009 35.952 1.794 -32.682 -78.825 -123.453 -177.641 -229.307 -289.143 7 8 9 10 11 12 13 -89.799 -37.771 -11.856 -0.472 5.235 6.423 6.386 4.584 2.766 0.128 -2.179 -4.927 -7.262 -9.869 17 18 19 20 -14.457
12
13
14
15
16
17
18
19
20
55.009
35.952
1.794
-32.682
-78.825
-123.453
-177.641
-229.307
-289.143
4.584
2.766
0.128
-2.179
-4.927
-7.262
-9.869
-12.069
-14.457
The most stable nucleus has a mass number 10
Figure 2: Sample run of the program
output.txt v
A
binding
energy
binding_ energy
per Nucleon
=================:
===============
-448.996
-226.623
-82.990
-3.778
47.111
64.228
70.245
55.009
35.952
1.794
-32.682
-78.825
-123.453
-177.641
-229.307
-289.143
-89.799
6
7
8
9.
10
11
12
13
-37.771
-11.856
-0.472
5.235
6.423
6.386
4.584
2.766
0.128
-2.179
-4.927
-7.262
-9.869
-12.069
-14.457
14
15
16
17
18
19
20
Figure 3: Output File
2. Modular Programming:
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.
f) main ():
- The main function is set up to make the calls to the functions as
specified in points a) to e)
3. Deliverable
Submit a Python source file: pa4_xxxxxx.py. For instance, if your ID is 38000, then you
should submit a file pa4_38000.py 2. Your source file will consist of two parts:
a) Header: incluues uucUmemation wiui your name, your suuent id, and section
Transcribed Image Text:12 13 14 15 16 17 18 19 20 55.009 35.952 1.794 -32.682 -78.825 -123.453 -177.641 -229.307 -289.143 4.584 2.766 0.128 -2.179 -4.927 -7.262 -9.869 -12.069 -14.457 The most stable nucleus has a mass number 10 Figure 2: Sample run of the program output.txt v A binding energy binding_ energy per Nucleon =================: =============== -448.996 -226.623 -82.990 -3.778 47.111 64.228 70.245 55.009 35.952 1.794 -32.682 -78.825 -123.453 -177.641 -229.307 -289.143 -89.799 6 7 8 9. 10 11 12 13 -37.771 -11.856 -0.472 5.235 6.423 6.386 4.584 2.766 0.128 -2.179 -4.927 -7.262 -9.869 -12.069 -14.457 14 15 16 17 18 19 20 Figure 3: Output File 2. Modular Programming: 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. f) main (): - The main function is set up to make the calls to the functions as specified in points a) to e) 3. Deliverable Submit a Python source file: pa4_xxxxxx.py. For instance, if your ID is 38000, then you should submit a file pa4_38000.py 2. Your source file will consist of two parts: a) Header: incluues uucUmemation wiui your name, your suuent id, and section
Expert Solution
steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY