Reference no: EM133090660
Practical - Problem solving and algorithms
You have to do your own work in order to achieve the learning outcomes.
However, it's still really helpful and good practice to work with others to understand problems and to discuss solutions. You are allowed to talk with others about these things... you just can't go too far.
Communication is a big part of IT, and it helps to know a little about who you are communicating with.
Internal students:
If you're in a face-to-face practical class with other students, you will play the "name game" as directed by your tutor (your name and what you like that starts with the same first letter, e.g., "I'm Yasmin and I like yachting").
External students:
Introduce yourself in Slack - include where you are studying from and any other interesting details you're happy to share. Thanks! Great, now let's get ready to focus on problem solving...
Record your answers for each of the below questions in a simple text file, questions.txt . You can use PyCharm (if you already know how), Notepad or any suitable program for creating your work file.
Logic Exercise
Sometimes in our learning, we will have non-IT-based exercises to help us with problem solving in any context. The emphasis is on developing skills that will help you approach new problems and work towards solutions.
These will not be silly trick riddles, but puzzles with logical, deducible answers. The goal is "to reach a conclusion by reasoning".
One of the important factors in attempting these questions is to really analyse the question and the information given ( or not given) in the question without making inappropriate assumptions. This is a valuable skill in IT and programming.
If you are ever working in a group on these, and you already know the answer (or you figure it out quickly), please help the others in the group by NOT just saying the answer. Maybe give appropriate guidance if needed so that others can work it out themselves and learn through the process.
Here's our first one...
Brown, Jones and Smith are three friends.
One of them is a project manager, one is a consultant, and the other is a programmer. The programmer, who is an only child, earns the least money.
Smith, who married Brown's sister, earns more than the consultant.
What is each person's job?
Note: record your answer for this question in your questions.txt file under the heading "Logic Exercise", so it's clear.
Problem Decomposition
For the following 3 problem descriptions, identify the nouns and verbs (separately) in each.
Note: You will end up with 6 separate answers for this section - the nouns & verbs, then the algorithm, for each of the 3 problems.
Write two separate lists (with subheadings) for each. If you're writing your answers using Word, you could copy the text and highlight each type of word in different colours or similar.
(Don't get hung up on the exact details of the words.)
Then go through the set of nouns and verbs and work out which ones are irrelevant or duplicated and remove them from the lists.
See if what's remaining is what you need to know to write an algorithm.
1. A doctor needs to be able to calculate the total amount of a drug that has been administered to a patient. The system will get the hourly dosage from the user, as well as the number of hours they have been receiving the medicine. The system will then display the total for the doctor.
2. Happy Photos needs a way to calculate the total charge for a customer's booking. The system will use the customer's name and the date of the booking to make a unique booking id. The hourly charge, and number of hours will be entered, and the total charge and id code will
be displayed.
3. A road trip planning system will ask the user for the distance travelled (in km) and the travel time in minutes. The user will then be shown the average speed (in km/hour) over the trip.
When you've decomposed these small problems into their parts (word types), write algorithms for each of them using either pseudocode or flowcharts.
At this stage, we're not worried about getting the details 'perfect', we just want to get used to problem solving processes.
Attachment:- Problem solving and algorithms.rar