Post on 24-Dec-2015
Problem Solving in Sprego
Mária Csernoch, Piroska Biró
csernoch.maria@inf.unideb.hu
Faculty of Informatics, University of Debrecen, Hungary
Computer problem solving approaches
computer algorithmic and debugging based
(CAAD)
trial-and-error wizard based
(TAEW)
deep approaches
surface approaches
algorithmic based
information based
concept based
Csernoch & Biro (2015) Computer Problem Solving. In Hungarian: Számítógépes problémamegoldás, TMT, Tudományos és Műszaki Tájékoztatás, Könyvtár- és információtudományi szakfolyóirat, vol. 62, no. 3, 2015, pp. 86–94.
Pólya (1954)How To Solve It – concept based
• understand the problem, see clearly what is required
• see how the various items are connected, how the unknown is connected to the data, in order to obtain the idea of the solution to make a plan
• carry out the plan• we look back, at the completed solution, we
review and discuss it
Problem solving in non-traditional programming environments
• understand the problem, see clearly what is required
• see how the various items are connected, how the unknown is connected to the data, in order to obtain the idea of the solution to make a plan
• carry out the plan• we look back, at the completed solution, we
review and discuss it
Usage!!!!
Bricolage!
Teaching Informatics
computer problem solving
concept and CAAD based=
Polya’s problem solving method
deep approach surface approach
Sprego
Sprego
Spre goSprego adsheet Le
Sprego functions
Sprego 1 Sprego 2 Sprego 3
SUM()AVERAGE()MIN()MAX() LEFT() RIGHT() LEN() SEARCH() IF()
Sprego functions
Sprego 1 Sprego 2 Sprego 3
SUM() INDEX()AVERAGE() MATCH()MIN() ISERROR()MAX() LEFT() RIGHT() LEN() SEARCH() IF()
Sprego functions
Sprego 1 Sprego 2 Sprego 3
SUM() INDEX() SMALL()AVERAGE() MATCH() LARGE()MIN() ISERROR() ROW()MAX() COLUMN()LEFT() AND()RIGHT() OR()LEN() NOT()SEARCH() SUBSTITUTE()IF() OFSET() TRANSPOSE() ROUND() RAND() INT()
Sprego tools
• Sprego functions• connection to mathematics
– concept of function– multilevel functions– multivariable functions
• array formulas– concept of vector
• discussion, debugging• authentic data sources• version independent
– MS Excel, OpenOffice, LibreOffice
Programming in functional languages
Developing computational
thinking
Problem solving process in Sprego
• building the concept– characteristics of the problem
• building the algorithm• coding (usage)
– most inside function output argument– outer function output argument– …– outmost function output result
• discussion, debugging
SpregoI’ve learned with Spregospreadsheet management,programming.https://jamesradburn.files.wordpress.com/2012/02/cropped-untitled-6.jpghttp://sd.keepcalm-o-matic.co.uk/i/trust-me-i-m-a-trainee-teacher.png
I’ve learned Sprego!
To use this, we have to think.
Creating multilevel functions leads to building algorithms.
Helps developing analytical thinking.
We can see clearly to advantages of general purpose functions.
Adaptable spreadsheet knowledge.
More conscious usage of arguments (inputs).
General purpose functions can be used on different contexts.
The multilevel INDEX(MATCH()) function is more interesting than the limited HLOOKUP() and VLOOKUP() functions.
• deep approach method• non-traditional programming environments
Sprego
Deep approach methods
• focus– problem solving
• effective• develop
– computational thinking– algorithmic, debugging skills
• environment– programming– non-traditional computer related activities
• introduction to programming• language(s) of end-users
Effectiveness of Sprego
• Teaching practice– pre- and in-service teachers of Informatics– tertiary education, students of Software Engineering– primary and secondary education
• Testing phases– pre-test (1ST): after graduation exam– post-test (2ND): after Sprego– delayed post-test (FI): one year after Sprego
Effectiveness of Sprego
List of states and territories of the United States
http://en.wikipedia.org/wiki/List_of_states_and_territories_of_the_United_States
State
• Characteristics– leading Space– closing [X] string, random
• Algorithm– removing Space cutting out Space-free
string– removing [X] string cutting out [X]-free
string– separating the states by [X]
• Coding
=LEN(A2:A51)
Coding – State – Leading Space
879
1210
69
171316
58
109
{ }
{ }
Coding – Leading Space
8 7
7 6
9 8
12 11
10 9
6 5
9 8
17 16
13 12
16 15
5 4
8 7
10 99 8
=LEN(A2:A51)
879
1210
69
171316
58
109
-1
Coding – Leading Space
8 7 Alabama
7 6 Alaska
9 8 Delaware
12 11 Kentucky[C]
10 9 Louisiana
6 5 Maine
9 8 Maryland
17 16 Massachusetts[D]
13 12 North Dakota
16 15 Rhode Island[F]
5 4 Utah
8 7 Vermont
10 9 Wisconsin9 8 Wyoming
=LEN(A2:A51)-1 RIGHT(A2:A51, ) = LEN(A2:A51)-1{ }
8 7
7 6
9 8
12 11
10 9
6 5
9 8
17 16
13 12
16 15
5 4
8 7
10 99 8
Coding – [X]
8
7
9
12
10
6
9
17
13
16
5
8
108
{ } =LEN(A2:A51)
Coding – [X]
8 4
7 3
9 5
12 8
10 6
6 2
9 5
17 13
13 9
16 12
5 1
8 4
10 68 4
-4{ } =LEN(A2:A51)
8
7
9
12
10
6
9
17
13
16
5
8
108
Coding – [X]
8 4 Alab
7 3 Ala
9 5 Delaw
12 8 Kentucky
10 6 Louisi
6 2 Ma
9 5 Maryl
17 13 Massachusetts
13 9 North Dak
16 12 Rhode Island
5 1 U
8 4 Verm
10 6 Wiscon8 4 Wyom
=LEN(A2:A51)-4{ } = RIGHT(A2:A51,LEN(A2:A51)-1) =LEFT( , ) = LEN(A2:A51)-4
8 4
7 3
9 5
12 8
10 6
6 2
9 5
17 13
13 9
16 12
5 1
8 4
10 68 4
Coding – separating the states by [X]
#VALUE!#VALUE!#VALUE!
10#VALUE!#VALUE!#VALUE!
15#VALUE!
14#VALUE!#VALUE!#VALUE!#VALUE!
=SEARCH("[",A2:A51){ }
Coding – separating the states by [X]
#VALUE!#VALUE!#VALUE!
10#VALUE!#VALUE!#VALUE!
15#VALUE!
14#VALUE!#VALUE!#VALUE!#VALUE!
#VALUE! TRUE#VALUE! TRUE#VALUE! TRUE
10 FALSE#VALUE! TRUE#VALUE! TRUE#VALUE! TRUE
15 FALSE#VALUE! TRUE
14 FALSE#VALUE! TRUE#VALUE! TRUE#VALUE! TRUE#VALUE! TRUE
=SEARCH("[",A2:A51) = (SEARCH("[",A2:A51)){ } =ISERROR( )
Coding – separating the states by [X]
#VALUE! TRUE#VALUE! TRUE#VALUE! TRUE
10 FALSE#VALUE! TRUE#VALUE! TRUE#VALUE! TRUE
15 FALSE#VALUE! TRUE
14 FALSE#VALUE! TRUE#VALUE! TRUE#VALUE! TRUE#VALUE! TRUE
=ISERROR(SEARCH("[";A2:A51)) =IF( ,"",""){ } = ISERROR(SEARCH("[",A2:A51))
#VALUE! TRUE#VALUE! TRUE#VALUE! TRUE
10 FALSE#VALUE! TRUE#VALUE! TRUE#VALUE! TRUE
15 FALSE#VALUE! TRUE
14 FALSE#VALUE! TRUE#VALUE! TRUE#VALUE! TRUE#VALUE! TRUE
#VALUE! TRUE#VALUE! TRUE#VALUE! TRUE
10 FALSE#VALUE! TRUE#VALUE! TRUE#VALUE! TRUE
15 FALSE#VALUE! TRUE
14 FALSE#VALUE! TRUE#VALUE! TRUE#VALUE! TRUE#VALUE! TRUE
#VALUE! TRUE Alabama#VALUE! TRUE Alaska#VALUE! TRUE Delaware
10 FALSE #VALUE! TRUE Louisiana#VALUE! TRUE Maine#VALUE! TRUE Maryland
15 FALSE #VALUE! TRUE North Dakota
14 FALSE #VALUE! TRUE Utah#VALUE! TRUE Vermont#VALUE! TRUE Wisconsin#VALUE! TRUE Wyoming
Coding – separating the states by [X]
#VALUE! TRUE#VALUE! TRUE#VALUE! TRUE
10 FALSE#VALUE! TRUE#VALUE! TRUE#VALUE! TRUE
15 FALSE#VALUE! TRUE
14 FALSE#VALUE! TRUE#VALUE! TRUE#VALUE! TRUE#VALUE! TRUE
=IF(ISERROR(SEARCH("[",A2:A51)),"","") =IF(ISERROR(SEARCH("[",A2:A51)), ,"") RIGHT(A2:A51,LEFT(A2:A51)-1) { }
Coding – separating the states by [X]
#VALUE! TRUE Alabama Alabama#VALUE! TRUE Alaska Alaska#VALUE! TRUE Delaware Delaware
10 FALSE Kentucky#VALUE! TRUE Louisiana Louisiana#VALUE! TRUE Maine Maine#VALUE! TRUE Maryland Maryland
15 FALSE Massachusetts#VALUE! TRUE North Dakota North Dakota
14 FALSE Rhode Island#VALUE! TRUE Utah Utah#VALUE! TRUE Vermont Vermont#VALUE! TRUE Wisconsin Wisconsin#VALUE! TRUE Wyoming Wyoming
=IF(ISERROR(SEARCH("[",A2:A51)),RIGHT(A2:A51,LEN(A2:A51)-1),"") LEFT(RIGHT(A2:A51,LEN(A2:A51)-1),LEN(A2:A51)-4))
{ }
#VALUE! TRUE Alabama#VALUE! TRUE Alaska#VALUE! TRUE Delaware
10 FALSE #VALUE! TRUE Louisiana#VALUE! TRUE Maine#VALUE! TRUE Maryland
15 FALSE #VALUE! TRUE North Dakota
14 FALSE #VALUE! TRUE Utah#VALUE! TRUE Vermont#VALUE! TRUE Wisconsin#VALUE! TRUE Wyoming
=IF(ISERROR(SEARCH("[",A2:A51)),RIGHT(A2:A51,LEN(A2:A51)-1), )
Population
• Characteristics– number of commas
• 1 comma: thousandth of original number• 2 commas: string
• Algorithm– deciding: number or string– removing commas
• Coding
Coding – Population{ } =G2:G51*1000
#VALUE!735132925749
#VALUE!#VALUE!#VALUE!#VALUE!#VALUE!
723393#VALUE!#VALUE!
626630#VALUE!
582658
Coding – Population
=G2:G51*1000 = G2:G51*1000 =ISERROR( ) { }
#VALUE! TRUE735132 FALSE925749 FALSE
#VALUE! TRUE#VALUE! TRUE#VALUE! TRUE#VALUE! TRUE#VALUE! TRUE
723393 FALSE#VALUE! TRUE#VALUE! TRUE
626630 FALSE#VALUE! TRUE
582658 FALSE
#VALUE!735132925749
#VALUE!#VALUE!#VALUE!#VALUE!#VALUE!
723393#VALUE!#VALUE!
626630#VALUE!
582658
Coding – Population
= ISERROR(G2:G51*1000) =ISERROR(G2:G51*1000) =IF(ISERROR(G2:G51*1000),,G2:G51*1000)
#VALUE! TRUE 0735132 FALSE 735132925749 FALSE 925749
#VALUE! TRUE 0#VALUE! TRUE 0#VALUE! TRUE 0#VALUE! TRUE 0#VALUE! TRUE 0
723393 FALSE 723393#VALUE! TRUE 0#VALUE! TRUE 0
626630 FALSE 626630#VALUE! TRUE 0
582658 FALSE 582658
#VALUE! TRUE735132 FALSE925749 FALSE
#VALUE! TRUE#VALUE! TRUE#VALUE! TRUE#VALUE! TRUE#VALUE! TRUE
723393 FALSE#VALUE! TRUE#VALUE! TRUE
626630 FALSE#VALUE! TRUE
582658 FALSE
{ }
Coding – Population =IF(ISERROR(G2:G51*1000),,G2:G51*1000) =IF(ISERROR(G2:G51*1000), , G2:G51*1000)
= SUBSTITUTE(G2:G51,",","") )
{ }
#VALUE! TRUE 0 4833722735132 FALSE 735132 735132925749 FALSE 925749 925749
#VALUE! TRUE 0 4395295#VALUE! TRUE 0 4625470#VALUE! TRUE 0 1328302#VALUE! TRUE 0 5928814#VALUE! TRUE 0 6692824
723393 FALSE 723393 723393#VALUE! TRUE 0 1051511#VALUE! TRUE 0 2900872
626630 FALSE 626630 626630#VALUE! TRUE 0 5742713
582658 FALSE 582658 582658
#VALUE! TRUE 0735132 FALSE 735132925749 FALSE 925749
#VALUE! TRUE 0#VALUE! TRUE 0#VALUE! TRUE 0#VALUE! TRUE 0#VALUE! TRUE 0
723393 FALSE 723393#VALUE! TRUE 0#VALUE! TRUE 0
626630 FALSE 626630#VALUE! TRUE 0
582658 FALSE 582658
Coding – Population
#VALUE! TRUE 0 4833722 4833722735132 FALSE 735132 735132 735132925749 FALSE 925749 925749 925749
#VALUE! TRUE 0 4395295 4395295#VALUE! TRUE 0 4625470 4625470#VALUE! TRUE 0 1328302 1328302#VALUE! TRUE 0 5928814 5928814#VALUE! TRUE 0 6692824 6692824
723393 FALSE 723393 723393 723393#VALUE! TRUE 0 1051511 1051511#VALUE! TRUE 0 2900872 2900872
626630 FALSE 626630 626630 626630#VALUE! TRUE 0 5742713 5742713
582658 FALSE 582658 582658 582658
=IF(ISERROR(G2:G51*1000), SUBSTITUTE(G2:G51,",",""), G2:G51*1000)
*1
=IF(ISERROR(G2:G51*1000), SUBSTITUTE(G2:G51,",","") , G2:G51*1000)
{
}
#VALUE! TRUE 0 4833722735132 FALSE 735132 735132925749 FALSE 925749 925749
#VALUE! TRUE 0 4395295#VALUE! TRUE 0 4625470#VALUE! TRUE 0 1328302#VALUE! TRUE 0 5928814#VALUE! TRUE 0 6692824
723393 FALSE 723393 723393#VALUE! TRUE 0 1051511#VALUE! TRUE 0 2900872
626630 FALSE 626630 626630#VALUE! TRUE 0 5742713
582658 FALSE 582658 582658
Substitutable functions
*IF?() functionsCOUNTIF()COUNTIFS()SUMIF()SUMIFS()AVERAGEIF()AVERAGEIFS()COUNTBLANK()COUNT()COUNTA()AVERAGEA()
Database functions
Matrix functionsHLOOKUP()VLOOKUP()ROWS()COLUMNS()
Maths functionsSUMPRODUCT()SUMSQ()SUMX2MY2()SUMX2PY2()SUMXMY2()SQRTPI()RANDBETWEEN()
Problem Solving in Sprego
Mária Csernoch, Piroska Biró
csernoch.maria@inf.unideb.hu
Faculty of Informatics, University of Debrecen, Hungary
Thank you for your attention.