Practical - Problem solving and algorithms

Assignment Help Python Programming
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

Reference no: EM133090660

Questions Cloud

Discuss the benefits and risks of going public : Discuss the benefits and risks of going public. Given the risks and rewards, examine Panera's financial information
Use of artificial intelligence in business operations : How can the use of artificial intelligence in business operations and financial reporting lead to an increased risk of fraud and what steps can be taken within
Treatment of the outlying latium towns : Address why the treatment of the outlying Latium towns was so important to the Roman government.
What are the clitella your jurisdiction : List the various premium codes used for out-of-office visits to a home and to a long-term care facility in your jurisdiction. caro?
Practical - Problem solving and algorithms : 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
Economic and political differences between the patricians : Discuss how the economic and political differences between the patricians and the plebeian classes ultimately led to a plebeian revolt. Include in your discussi
Example of an informational ad : 2-3 paragraph response. Can you think of an example of an informational ad? What information is provided, and how does it persuade consumers?
How apple became the most successful global firm : How Apple became the most successful global firm?
What makes bill gates an effective leader : What makes Bill Gates an effective leader?

Reviews

Write a Review

Python Programming Questions & Answers

  Write a python program to implement the diff command

Without using the system() function to call any bash commands, write a python program that will implement a simple version of the diff command.

  Write a program for checking a circle

Write a program for checking a circle program must either print "is a circle: YES" or "is a circle: NO", appropriately.

  Prepare a python program

Prepare a Python program which evaluates how many stuck numbers there are in a range of integers. The range will be input as two command-line arguments.

  Python atm program to enter account number

Write a simple Python ATM program. Ask user to enter their account number, and print their initail balance. (Just make one up). Ask them if they wish to make deposit or withdrawal.

  Python function to calculate two roots

Write a Python function main() to calculate two roots. You must input a,b and c from keyboard, and then print two roots. Suppose the discriminant D= b2-4ac is positive.

  Design program that asks user to enter amount in python

IN Python Design a program that asks the user to enter the amount that he or she has budget in a month. A loop should then prompt the user to enter his or her expenses for the month.

  Write python program which imports three dictionaries

Write a Python program called hours.py which imports three dictionaries, and uses the data in them to calculate how many hours each person has spent in the lab.

  Write python program to create factors of numbers

Write down a python program which takes two numbers and creates the factors of both numbers and displays the greatest common factor.

  Email spam filter

Analyze the emails and predict whether the mail is a spam or not a spam - Create a training file and copy the text of several mails and spams in to it And create a test set identical to the training set but with different examples.

  Improve the readability and structural design of the code

Improve the readability and structural design of the code by improving the function names, variables, and loops, as well as whitespace. Move functions close to related functions or blocks of code related to your organised code.

  Create a simple and responsive gui

Please use primarily PHP or Python to solve the exercise and create a simple and responsive GUI, using HTML, CSS and JavaScript.Do not use a database.

  The program is to print the time

The program is to print the time in seconds that the iterative version takes, the time in seconds that the recursive version takes, and the difference between the times.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd