This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-03-22 19:02:15

SimpleScratch
Scratcher
Registered: 2007-05-25
Posts: 100+

Make a branching database prog

Anyone up for a challenge?  smile

Can Scratch (or any variant on it) be used to make a Branching Database app?

e.g enter questions with the two answers - then add questions to each answer path etc etc to get

Does it have 4 legs
yes - does it say woof
     -- yes - its a dog
    -- no  - its cat

(VERY VERY simple example)

The program needs to allow input of questions /answers, preferably save/load  them (via lists????)

Give it a go if you think your up to it  smile

Si

Offline

 

#2 2012-03-23 03:27:20

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: Make a branching database prog

Are they exclusively yes/no questions?


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#3 2012-03-23 05:31:48

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: Make a branching database prog

In my opinion it's not too hard. You need to encode each possible outcome as a number obtained by converting a binary string to base-10, and each member of the binary string is obtained by the yes-no answer.

Does it have 4 legs: YES (1)
Does it say Woof?: NO (0)
String: 10
Base 2: 2
Therefore item 2 of the answers list should contain "Cat".


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

Board footer