Problem solving Introduction to programming. Do Now You are at a river that you want to cross with...

16
Problem solving Introduction to programming

description

How to solve a problem Initial situation Resources Constraints Assumptions Goal Ownership You, the chicken, the bag of grain and the dog are on one bank of the river with access to a boat The rowing boat and your knowledge and problem solving skills You can only take one thing in the boat with you at once. You must not leave the dog with the chicken and the chicken with the bag of grain You can only take things one way across the river You, the chicken, the bag of grain and the dog must be on the other bank intact You are involved in the planning and carrying out of the solution. You benefit from a solution

Transcript of Problem solving Introduction to programming. Do Now You are at a river that you want to cross with...

Page 1: Problem solving Introduction to programming. Do Now You are at a river that you want to cross with all your goods. Your goods consist of a chicken, a.

Problem solving

Introduction to programming

Page 2: Problem solving Introduction to programming. Do Now You are at a river that you want to cross with all your goods. Your goods consist of a chicken, a.

Do Now

You are at a river that you want to cross with all your goods. Your goods consist of a chicken, a bag of grain and your dog, Rover. You have to cross the river in a rowing boat but can only take one of your goods with you at once. You cannot leave the chicken alone with the grain as the chicken will eat the grain. You cannot leave your dog alone with the chicken as Rover will eat it. How do you get everything intact across the river?

Page 3: Problem solving Introduction to programming. Do Now You are at a river that you want to cross with all your goods. Your goods consist of a chicken, a.

How to solve a problemInitial situation

Resources

Constraints

Assumptions

Goal

Ownership

You, the chicken, the bag of grain and the dog are on one bank of the river with access to a boat

The rowing boat and your knowledge and problem solving skills

You can only take one thing in the boat with you at once. You must not leave the dog with the chicken and the chicken with the bag of grain

You can only take things one way across the river

You, the chicken, the bag of grain and the dog must be on the other bank intact

You are involved in the planning and carrying out of the solution. You benefit from a solution

Page 4: Problem solving Introduction to programming. Do Now You are at a river that you want to cross with all your goods. Your goods consist of a chicken, a.
Page 5: Problem solving Introduction to programming. Do Now You are at a river that you want to cross with all your goods. Your goods consist of a chicken, a.

Becoming a ProgrammerTo become a programmer you should be an

An analytical thinkerProgrammers need to be problem solvers. The process of programming requires that we systematically break complicated problems down, plan and implement solutions and find / eliminate small inconsistencies in code (bugs).

Analytical thinking also manifests in the ability to follow complicated logic through disparate code segments and understand it. It allows us to grasp abstract concepts such as Object Oriented methodology and design patterns and implement it in practice.

Page 6: Problem solving Introduction to programming. Do Now You are at a river that you want to cross with all your goods. Your goods consist of a chicken, a.

Riddle one

How can this shape be cut once, in a straight line to create to equal sized halves.

Page 7: Problem solving Introduction to programming. Do Now You are at a river that you want to cross with all your goods. Your goods consist of a chicken, a.

How to solve a problemInitial situation

Resources

Constraints

Assumptions

Goal

Ownership

Page 8: Problem solving Introduction to programming. Do Now You are at a river that you want to cross with all your goods. Your goods consist of a chicken, a.

Balls

You have 8 balls. One of them is defective and weighs less than others. You have a balance to measure balls against each other. In 2 weighing's how do you find the defective one?

Page 9: Problem solving Introduction to programming. Do Now You are at a river that you want to cross with all your goods. Your goods consist of a chicken, a.

Gold

You’ve got someone working for you for seven days and a gold bar to pay them. The gold bar is segmented into seven equal pieces. You must give them a piece of gold at the end of every day. If you are only allowed to make two breaks in the gold bar, how do you pay your worker?

Page 10: Problem solving Introduction to programming. Do Now You are at a river that you want to cross with all your goods. Your goods consist of a chicken, a.

How to solve a problemInitial situation

Resources

Constraints

Assumptions

Goal

Ownership

Page 11: Problem solving Introduction to programming. Do Now You are at a river that you want to cross with all your goods. Your goods consist of a chicken, a.

beans

You have a bucket of jelly beans. Some are red, some are blue, and some green. With your eyes closed, pick out 2 of a like colour. How many jelly beans do you have to grab to be sure you have 2 of the same?

Page 12: Problem solving Introduction to programming. Do Now You are at a river that you want to cross with all your goods. Your goods consist of a chicken, a.

How to solve a problemInitial situation

Resources

Constraints

Assumptions

Goal

Ownership

Page 13: Problem solving Introduction to programming. Do Now You are at a river that you want to cross with all your goods. Your goods consist of a chicken, a.

Coins

You have two normal U.S. coins that add up to 35 cents. One of the coins is not a quarter. What are the two coins?

Page 14: Problem solving Introduction to programming. Do Now You are at a river that you want to cross with all your goods. Your goods consist of a chicken, a.

How to solve a problemInitial situation

Resources

Constraints

Assumptions

Goal

Ownership

Page 15: Problem solving Introduction to programming. Do Now You are at a river that you want to cross with all your goods. Your goods consist of a chicken, a.

Sending a packageYou have a package that you have to send to your friend. It is very secret and you do not trust the mail man that you have to use to send it. Both you and your friend have a padlock but neither of you have a key to the others laptop. How can you send the package and guarantee that the package cannot be opened by anyone else but your friend

Page 16: Problem solving Introduction to programming. Do Now You are at a river that you want to cross with all your goods. Your goods consist of a chicken, a.

How to solve a problemInitial situation

Resources

Constraints

Assumptions

Goal

Ownership