Play this game!!! https://scratch.mit.edu/projects/100912180/#editor We are looking at a binary search today - where the computer keeps halving the numbers so it guesses your answer faster! What is happening in this algorithm? What is the computer being told to do each time? Explain in your own words as a comment below.
26 Comments
Abdul
20/11/2018 02:13:25 pm
The algorithm is saying the guess or more and if you say n it says another guess or more.
Reply
JOKUBAS
20/11/2018 02:15:20 pm
The algoritbasicly guess the number by dividing it
Reply
Hooda
20/11/2018 02:16:36 pm
your giving the computer a number between 0 and 127 and the computer will say is your number have of your upper number and if you write N it will give you a number less than halve , if you say Y i will give you your number more than . then if you complete this process you will get your end result.
Reply
Abdullah.E
20/11/2018 02:17:04 pm
The algorithm in the computer is doing something like where you choose a number and the computer says a number and you say y or n then it chooses a different number then again you choose y or n.The computer tries to guesse by going upper or lower.
Reply
ammar
20/11/2018 02:18:00 pm
When you click the green flag, it resets the lower and upper.Then it
Reply
Inaayah
20/11/2018 02:18:09 pm
The computer is asking us to choose a number between 0 and 127. It then divided 127 by 2 to get half. If the number you chose was over 64 , the computer automatically changes the upper or lower number depending on your chosen number. After the computer has divided the number , until it has a solid number , it says,"Its ..." and whatever your chosen number was. Magic, right?
Reply
Kyson
20/11/2018 02:18:33 pm
it tells you its upper and lower and then it says think of a number between 0 and 127 and after all that it starts to guess your number and it halfs them each time
Reply
shayla
20/11/2018 02:18:50 pm
when you click the green flag,the computer will set to 0 and think of a nummber btween 234 ten it will say randaom things like 1 4 8 10 7 2 it will say is tit 56 yay you got it right
Reply
Eszter
20/11/2018 02:19:40 pm
you have the lower and the upper number which is 0 and 127 it's half 127 which is 64 and it's ask 64 or more if you click n it's divide 62 by 2 it about 32 so its ask 32 or more and if you say n it's say 15 your number is 15 and you said y and it's say it's 20 or more you say n it's change the upper number to 19 and it's ask it's 19 or more and you say n it's says 15
Reply
Ikran
20/11/2018 02:19:53 pm
In this lesson we are learning about Algorithms on scratch we are going to try to program it to to work.It asked a number and if its more .if you click N then it sees if it can guess your number
Reply
Jayce
20/11/2018 02:20:00 pm
it says is it more then a number and if it says less then your number you write y and if it says more you write n
Reply
Ayoob
20/11/2018 02:20:12 pm
We are looking at a binary search where the computer keeps halving the numbers so it guesses your answer faster.
Reply
bobby
20/11/2018 02:20:22 pm
it tells you to answer yes or no on a question to until it gets your number that you had in your head.
Reply
abdelkarim
20/11/2018 02:20:34 pm
When you click the green flag,the computer will set the lower and the upper and then it will halve them.and then it will say is it the number that got divided by or more.then you type n[no]or y[yes].
Reply
Jamelia
20/11/2018 02:20:54 pm
it is halving the upper number to see if the number is high or low and then it will forget about the half that and then it will half the number after that and then when you click y it will round to the number that you thought of.
Reply
Adam H
20/11/2018 02:21:01 pm
The computer gives you a number and then said ''is it 64 or more'' if you say n it half's 64 then sets the lower to 63 then it keeps saying for example is it 32 or more and so on until the upper reaches the lower.
Reply
Carla
20/11/2018 02:21:17 pm
The algorithm is showing that the lower number is 0 and the upper is 127 and when they press the green flag the algorithm will say think of a number between 0 and 127 and after that being said it will say is the number 67 or higher if you say n the upper will change and if you say y the
Reply
Adam
20/11/2018 02:21:23 pm
The game is about that the computer asks the numbers between 0 and 127. If he asks you is it 56 or more if you write n for a reply he will cross all other numbers after 56. And if you write y for your answer the computer will cross out all the numbers before 56. If you keep writing n for the question given it will keep making a smaller number by taking away 1 until you will say y for your answer. If you keep saying y the computer will make a bigger number by 1 until you will say n.
Reply
Basmala
20/11/2018 02:21:36 pm
The computer has an upper and a lower number and then asks us to choose a number from 0-127.When you have chosen a number it divides the upper number by 2.The computer is being told to guess the number then if it isn't correct you wright N then if it is correct write Y.
Reply
Sana
20/11/2018 02:21:41 pm
The computer is asking us to think of a number between 0 and 127.The computer half 127 then if it is correct then press y if it is lower then press n. Then it will change and it will take away the numbers that are incorrect. After when the computer has guessed your number then you press y. Have fun
Reply
mohammmed
20/11/2018 02:21:52 pm
this game is saying that the computer will ask like 127 and he going guess what number you are thinking and it will ask 56 or more if you say no it wipes 127 to 56 all the number and then 56 between 0 if your number its like 6 it will ask like is it 34 or more and you say not will cancel all the number that upper than 34 the computer will do 34 half and guess and it will say is it 12 or lower and you say and it would keep on doing that until it finds your number
Reply
Zara N
20/11/2018 02:22:10 pm
the algorithm is showing that when u press the green flag it will say think of a number between 0 and 127 then it will say 64 or more and if u press n the lower will change and if u press y the upper number will change
Reply
Aban
20/11/2018 02:22:26 pm
The computer halves the upper number and then it says is it 64 or more because that is half of 127 if you wright N it will half 64 which is 32 then it will the lower number will be 32 and the upper number will be 63 and it will keep doing that until you type Y it will change the upper number in to a lower number and it will say its when they one number between the upper and lower number.
Reply
hajar
20/11/2018 02:22:45 pm
In this algorithm its showing that when we start it asks as is are number higher then 64 if we press n it will divide by 2 then will ask as if its higher it will then repeat till the lower and higher are the same then it will now what the number is wright.
Reply
Shamir
20/11/2018 02:22:46 pm
its tell you upper or lower because it half it each time and it helpful like 9 or 54
Reply
Muhammad
20/11/2018 02:23:01 pm
Firstly the algorithm tells you what numbers there are, for an example 0 to 100 it will say a random number like 9, if you say it is not your number then it will cut out all numbers before it and the lowest number will turn into 9 it will pick a number again and if its more than your own number it will dived the number by 2 and round it that will then build up to your number.
Reply
Your comment will be posted after it is approved.
## Leave a Reply. |
## Miss WestermanWrite something about yourself. No need to be fancy, just an overview. ## Archives
February 2019
## Categories |