Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part 1: Programming Radioactive Decay App 1.1 Problem Statement A radioactive substance decays over time. Some substances decay very quickly, others more slowly. The rate

Part 1: Programming Radioactive Decay App 1.1 Problem Statement A radioactive substance decays over time. Some substances decay very quickly, others more slowly. The rate at which a substance decays is measured by its half-life, which indicates the amount of time it takes for half of the original sample to decay. The half life of a substance can be calculated using the given formula;

The figure given below shows how an object decays over time if we initially start with 10 grams of the object and the object has an half-life of 10 seconds.

1.2 Problem to be Solved The Science Lab coordinator for The University of South Pacific has recruited you to create a program for managing and stock of radioactive substances in the USP labs. As part of this program, you will be required to monitor the availability of radioactive material and create an order for all the elements that are in short supply. The coordinator will provide you with a text file that will state the name of the radioactive substance, the half-life in days as well as the amount of substance currently present in the lab given in grams. The picture below shows a portion of the file.

Your program is supposed to: 1. Read all of this information 2. Determine the level of stock after 30 days based on radioactive decay rate 3. Create an order for all the elements that are low in stock or will become low in stock in the next 30 days due to radioactive decay. The lab needs a constant supply of these elements thus the minimum stock level of any substance should not be below 100 grams. If the substance availability is less than 100 grams, then this needs to be added to your order. 4. Print the order to a file called order.txt For example Actinium-225 has a half-life of 10 days and current availability of 314 grams. Therefore availability after 30 days for this would be; () = 1 2 () = 314 1 2 () = 39.25 This indicates that Actinium-225 needs to be ordered as after 30 days, its availability will be less than 100 grams. Task 1: Write an algorithm to solve the problem mentioned above. Your algorithm must have a loop as well as a decision structure. This should be written as pseudocode and added as comments in your python file. Task 2: Translate your algorithm into a Python program. The python implementation must have be able to read the data file and create the order file . 1.2.2 Use of Functions in Assignment: It is necessary that you implement this assignment using functions. To obtain the maximum score you must demonstrate some ability to create and use functions of your own. 1.3 Important Note: In your program you must write comments where necessary. Dont write comment for obvious code, but segments of code which seem complex.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions