Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Task 1

Create a calculator that works in this way:


a. User inputs a number.
b. User selects one of four arithmetic operators.
c. User inputs second number.
d. The appropriate output is provided

Task 2
A system is required to calculate the delivery cost of parcels. All parcels have a
fixed charge for delivery if the parcel is 5 kg or below in weight. For local
deliveries this charge is £20; for international deliveries the charge raises to
£40.
The maximum weight limit for international deliveries is 5 kg; however, for local
deliveries extra weight is permitted and charged at £1 for every 1 kg above that
limit.
a. Create a python program that will identify if the parcel is local or international
and then apply the appropriate weight formula to calculate the correct cost.
b. Test that your algorithm works by programming and running your code in
Python.

Task 3
Write a python program that will get a number as the user’s input and will return
the information is the number is prime or not. (try to come up with the fastest
version)

Task 4
A student is completing a mathematical probability study. They are required to
throw a standard six-sided dice 100 times. They will input the number shown at
each throw into a system. The system will output the number of times the dice
shows a six and the average value of all the throws

Task 5
The student completing the mathematical probability study in the previous Task
decides to extend the study to include two standard six-sided dice. The student
will throw both dice simultaneously, inputting both numbers shown at each
throw into a system. The system will record the number of ‘doubles’ (throws that
result in both dice showing the same number). The process will end when 100
doubles have been recorded, at which time the system will output the
percentage of total throws that resulted in a double.

Task 6
A user inputs into a system a sequence of positive numbers. They indicate the
end of the sequence by inputting the value –1. The system will output the
highest and lowest numbers input.
Task 7
A user has been asked to investigate the numbers of students that are studying
at schools in a geographical region. The user is required to input the name of the
school and the number of its students for all 200 schools in the region. The
system will output the name of the school with the highest number of students
and the name of the school with the lowest number of students.

Task 8
A scientist is using a temperature sensor to record the exothermic reaction
caused when two chemicals are mixed. Both chemicals start at the same
temperature (which is recorded in the system). Once every minute, the sensor
sends the temperature of the combined chemicals to the system. The system will
continue to record the temperature values as long as the temperature remains
above the initial start temperature. The expected output is the length of time in
minutes the reaction takes to return to the initial value. It should also show the
highest temperature reached and the time, in minutes from the start of the
experiment, that this temperature was reached.

Task 9
Produce a flowchart and the pseudocode for a system that will only accept
positive numbers. If the given number is not a positive one, the program will ask
the user to re-enter the number until they enter a positive one. The end of the
execution is achieved with the use of the # symbol.

Task 10
Create a python program for a system that will check that users have input a
password that is longer than six characters. In case that the password is shorter
than that, the user will be asked to re-enter a password with correct length.

You might also like