the u practical s ' w p r c - hu-berlin.de · 2nd year students did better with python...
TRANSCRIPT
THE USE OF PYTHON IN PRACTICAL
STUDENTS' WORK AT PROGRAMMING-
RELATED COURSES
Costin Bădică, Ion Buligiu, Ionuţ Murareţu
University of Craiova, Romania
Cooperation at Academic Informatics Education across Balkan Countries and Beyond
Hvar, Croatia, September 2-6, 2019September 03, 2019
Talk Outline
◼ Introduction & Motivation
◼ Algorithms Design
◼ Artificial Intelligence
◼ Conclusions
Cooperation at Academic Informatics Education across Balkan Countries and Beyond
Hvar, Croatia, September 2-6, 2019September 03, 2019
World of Programming
Languages◼ Imperative vs Declarative Paradigms:
❑ Imperative (state-oriented): focused on “how?”
◼ Procedural (von Neumann): C, Ada, Fortran
◼ Object-oriented: C++, Smalltalk, Eiffel, Java
❑ Declarative (goal-oriented): focused on “what?”
◼ Functional: Lisp, Haskell, ML, F# (a kind of ML), Erlang, Haskell
◼ Logic: Prolog, spreadsheets
◼ Compiled vs Interpreted Languages:
❑ Compiled: C, Assembler
❑ Interpreted (scripting): Perl, Python, PHP, JavaScript
❑ Partly compiled & partly interpreted: Java, C#
Cooperation at Academic Informatics Education across Balkan Countries and Beyond
Hvar, Croatia, September 2-6, 2019September 03, 2019
Python Popularity in Google Trends
Cooperation at Academic Informatics Education across Balkan Countries and Beyond
Hvar, Croatia, September 2-6, 2019September 03, 2019
2018 vs 2015 Interactive Top
Cooperation at Academic Informatics Education across Balkan Countries and Beyond
Hvar, Croatia, September 2-6, 2019September 03, 2019
Why Python?
◼ Python is an interpreted language – C is compiled language
◼ Python is higher-level than C, being characterized by:❑ Simple and readable syntax
❑ Dynamic typing
❑ High-level data types
◼ Python is a general-purpose programming language popular for:❑ Algorithms – close to pseudocode, fast prototyping and testing
❑ AI / ML / DS
❑ Scientific (Math)
◼ Python is multi-paradigm supporting different styles of
programming enabling comparisons of readability /
comprehensibility and efficiency / speed◼ Plethora of tools:
❑ Jupyter Notebook PyCharm by JetBrains
Cooperation at Academic Informatics Education across Balkan Countries and Beyond
Hvar, Croatia, September 2-6, 2019September 03, 2019
Courses
◼ Algorithms Design
❑ 1st year, 2nd semester CE
◼ Artificial Intelligence
❑ 2nd year, 2nd semester CE
Cooperation at Academic Informatics Education across Balkan Countries and Beyond
Hvar, Croatia, September 2-6, 2019September 03, 2019
@ CLRS
@ AIMA
Algorithms Design – Overview
◼ Learning objectives:
❑ LO1: Principles of algorithm analysis, modular programming and data abstraction.
❑ LO2: Fundamental algorithms and fundamental methods of algorithm design.
❑ LO3: Practical experience in programming small-scale experiments involving
implementation, testing and evaluation of algorithms.
◼ Practical work is focused on algorithm implementation:
❑ Standard C
❑ Python
◼ Exposure to Python
❑ Very basic: program structure, functions, modules
❑ Operations with Python lists
❑ Focus on self-learning
Cooperation at Academic Informatics Education across Balkan Countries and Beyond
Hvar, Croatia, September 2-6, 2019September 03, 2019
Assignments in AD
◼ 2 lab assignments
❑ C implementation compulsory
❑ Python implementation – optional
◼ 1 course assignment (homework)
❑ C & Python implementations – compulsory
◼ Assignment tasks:
❑ Program algorithms using C and possibly Python
❑ Prepare few (usually 5) non-trivial test cases and use them to
experiment with the code
❑ Prepare technical report describing the work
Cooperation at Academic Informatics Education across Balkan Countries and Beyond
Hvar, Croatia, September 2-6, 2019September 03, 2019
Google Classroom
Cooperation at Academic Informatics Education across Balkan Countries and Beyond
Hvar, Croatia, September 2-6, 2019September 03, 2019
AD Lab Assignments Results
Cooperation at Academic Informatics Education across Balkan Countries and Beyond
Hvar, Croatia, September 2-6, 2019September 03, 2019
Python C
0-4 5-9 10-15 0-4 5-9 10-15
A1 3 6 12 1 16 126
A2 1 7 2 3 55 80
HA 2 18 70 3 24 101
3 1 26 7
1812
2
70
0
10
20
30
40
50
60
70
80
A1 A2 HA
Python
0-4 5-9 10-15
1 3 316
55
24
126
80
101
0
20
40
60
80
100
120
140
A1 A2 HA
C
0-4 5-9 10-15
AD HW Assignment Results
Cooperation at Academic Informatics Education across Balkan Countries and Beyond
Hvar, Croatia, September 2-6, 2019September 03, 2019
Homework Assignment
0-4 5-9 10-15
Python 2 18 70
C 3 24 101
2 3
1824
70
101
0
20
40
60
80
100
120
Python C
Homework Assignment
0-4 5-9 10-15
AD – Summary
Cooperation at Academic Informatics Education across Balkan Countries and Beyond
Hvar, Croatia, September 2-6, 2019September 03, 2019
Total number of students 169
A1Total number of submissions 143
Submissions with Python 21
A2Total number of submissions 138
Submissions with Python 10
HWTotal number of submissions 138
Submissions with Python 90
Artificial Intelligence – Overview
◼ Introduction to basic AI topics
◼ Follow the traditional approach – AIMA textbook
◼ Main topics:
❑ Logic
❑ Problem solving (searching): uninformed & informed
❑ Constraint satisfaction
❑ Probabilistic reasoning
❑ Semantic networks
◼ Practical Work
❑ Prolog as practical application of logic
❑ Implementation of AI algorithms using various programming languages
Cooperation at Academic Informatics Education across Balkan Countries and Beyond
Hvar, Croatia, September 2-6, 2019September 03, 2019
Popularity of AI-Related Disciplines
Cooperation at Academic Informatics Education across Balkan Countries and Beyond
Hvar, Croatia, September 2-6, 2019September 03, 2019
AI Assignments
◼ 2 lab assignments A1 and A2
❑ A1: use of Prolog was compulsory (not considered here)
❑ A2: use of Python was compulsory
◼ 1 course assignment (homework) HW
❑ Programming language was chosen by the student
◼ Assignment tasks:
❑ Program AI problems / algorithms
❑ Prepare few non-trivial test cases and use them to experiment
with the code
❑ Prepare technical report describing the work
Cooperation at Academic Informatics Education across Balkan Countries and Beyond
Hvar, Croatia, September 2-6, 2019September 03, 2019
Google Classroom
Cooperation at Academic Informatics Education across Balkan Countries and Beyond
Hvar, Croatia, September 2-6, 2019September 03, 2019
Code Base – AIMA
Cooperation at Academic Informatics Education across Balkan Countries and Beyond
Hvar, Croatia, September 2-6, 2019September 03, 2019
@ itchronicles.com
AI Lab Assignment 2 Results
Cooperation at Academic Informatics Education across Balkan Countries and Beyond
Hvar, Croatia, September 2-6, 2019September 03, 2019
Assignment 2
0-49 50-79 80-100
Python 30 80 30
30
80
30
0
10
20
30
40
50
60
70
80
90
0-49 50-79 80-100
Python
AI HW Assignment Results
Cooperation at Academic Informatics Education across Balkan Countries and Beyond
Hvar, Croatia, September 2-6, 2019September 03, 2019
Homework Assignment
0-49 50-79 80-100
Python 24 22 45
C/C++ 15 11 4
Java 2 10 1
JavaScript 0 1 0
24
15
20
22
1110
1
45
4
10
0
5
10
15
20
25
30
35
40
45
50
Python C/C++ Java JavaScript
0-49
50-79
80-100
AI – Summary
Cooperation at Academic Informatics Education across Balkan Countries and Beyond
Hvar, Croatia, September 2-6, 2019September 03, 2019
Total number of students 194
A2Total number of submissions 140
Submissions with Python 140
HWTotal number of submissions 165
Submissions with Python 91
Educational Issues
◼ 2nd year students did better with Python programming. They had
additional Python knowledge from Object-Oriented
Programming course.
◼ Hints given to 1st year students during AD course regarding self-
instruction with Python were very useful – for example using
Python to solve simple algorithmic projects on Project Euler.
◼ Despite only very basic exposure to Python, most of 1st year
students responded well to Python adaptation, about 75%
obtaining good results at the HW assignment.
◼ To increase Python acceptance, we decided to dedicate at least
one lab session to Python during next year AD course.
Cooperation at Academic Informatics Education across Balkan Countries and Beyond
Hvar, Croatia, September 2-6, 2019September 03, 2019
Conclusions
◼ We presented our approach for introducing Python
language to 1st year students.
◼ We presented our focus on Python of 2nd year
students of introductory AI course.
◼ We presented the outcomes of using Python in
practical work at AD & AI courses.
Cooperation at Academic Informatics Education across Balkan Countries and Beyond
Hvar, Croatia, September 2-6, 2019September 03, 2019
Cooperation at Academic Informatics Education across Balkan Countries and Beyond
Hvar, Croatia, September 2-6, 2019September 03, 2019