SlideShare a Scribd company logo
ABOUT LEARNING TO
PROGRAM
ANNA MAKARUDZE
PYCON NAMIBIA 2016 TALK
27 JANUARY 2016
BACKGROUND – MY INTRODUCTION TO
PROGRAMMING
WHERE
• Zimuto High School,
Masvingo, Zimbabwe
WHEN
1999 – 2002 Ordinary Level
(GCE O’ Level),
•Subject – Computer Studies
•Language – BASIC/DBASE
III
STAGES
1. Define The Task/Tasks
2. Write an Algorithm/ Pseudocode
3. Write Code
4. Debug And Test
5. Deploy
DEFINE THE TASK/TASKS
•The first important task/stage in programming.
•Understand what it is you are required to do.
•Break down the question/project/task into small
tasks.
•Can use either bottom/up or top/down modular
approach.
EXAMPLE – DEFINE THE TASKS
PROBLEM
• Consider a sales rep of a network
marketing company selling goods
in ZAR but paying in USD.
Calculate the USD value of order
after discount. Discount rate
ranges from 20% to 35%
depending on order size. Forex
rate uses current rate. The
following discount rates apply for
a given order size:
DISCOUNT RATES
Order Size
(ZAR)
Discount Rate
(%)
<= 900 20
901-1800 25
1801-2700 30
2701 - 35
WRITE AN ALGORITHM/PSEUDOCODE
•Step by step instructions written in a
plain/natural language, e.g. English, Portuguese,
etc., which show the actions to be taken in order
to achieve a particular goal.
ALGORITHM/PSEUDOCODE
Start
Enter the total_value of order in ZAR
Enter the current_rate USD:ZAR
Determine the discount rate*
Calculate total value in USD*
Calculate discount*
Calculate amount to be paid*
Return total value in ZAR, total value in USD, discount and amount to be paid
End
ALGORITHM/PSEUDOCODE – DETAILED
DETERMINE DISCOUNT RATE
*If total_value <=900 then
discount_rate = 20%
Else if total_value <= 1800 then
discount_rate = 25%
Else if total_value <= 2700 then
discount_rate = 30%
Else discount_rate = 35%
End if
CALCULATE TOTAL VALUE IN USD
AND DISCOUNT RATE
*total_value_usd = total_value /
current _rate
*discount = total_value _usd *
discount_rate
*amount_due = total_value _usd –
discount
WRITE CODE
•Write the program using the syntax of the
chosen programming language.
•Done in the program’s development environment
to enable testing.
•In our case, python, using an IDE of your choice.
IF… STATEMENT - PYTHON
if total_value <=900:
discount_rate = 0.20
elif total_value <= 1800:
discount_rate = 0.25
elif total_value <= 2700:
discount_rate = 0.30
else:
discount_rate = 0.35
IF… STATEMENT – C
if (total_value <=900) {
discount_rate = 0.20;
}
else if (total_value <= 1800) {
discount_rate = 0.25;
}
else if (total_value <= 2700) {
discount_rate = 0.30;
}
else {
discount_rate = 0.35;
}
IF… STATEMENT – C++
if total_value <=900 {
discount_rate = 0.20;
}
else if total_value <= 1800 {
discount_rate = 0.25;
}
else if total_value <= 2700 {
discount_rate = 0.30;
}
else {
discount_rate = 0.35;
}
IF… STATEMENT – VISUAL BASIC
If total_value <=900 Then
discount_rate = 0.20
ElseIf total_value <= 1800 Then
discount_rate = 0.25
ElseIf total_value <= 2700 Then
discount_rate = 0.30
Else
discount_rate = 0.35
End If
COMPARISON BETWEEN PSEUDOCODE AND CODE
ALGORITHM/PSEUDOCODE
•Semantics –
meaning of your
code
CODE/PROGRAM
•Syntax – gramma of
your code
DEBUG AND TEST
•Involves testing the program to determine if it is
working as expected.
•Process is repeated until the program is running
without errors and giving required output.
•Normally takes up most of the programmer’s time.
•Code normally tends to yield unexpected results.
DEPLOY
•Package your application for deployment and
start using your application.
•Different languages deploy applications in a
different manner.
•You therefore need to know how to
deploy/publish your app using your IDE.
RESOURCES USED IN LEARNING PROGRAMMING
2000s
• Textbooks
• Teacher’s notes and
guidance
• Projects by students before
you
2010 - DATE
• Textbooks
• Teacher’s notes and guidance
• Projects by students before you
• Internet - many websites, videos
including Stackoverflow, Github, MVA,
etc.
• PyCons and many other conferences
• Learning to program has never been
this easy!!!
Questions
Answers
Progress
Thank You!
amakarudze@gmail.com
twitter: @amakarudze

More Related Content

PDF
Master in Microsoft Excel Training Malaysia (Training Flyer)
PDF
SAMPRICE_fi
PPT
Shortsalesuccesstrainingpromo 5-17-10
PPT
Cs 1114 - lecture-5
PPT
PPTX
Nesta destination local cc 070715
PPTX
Hobbies and interests of industrial students in ust
Master in Microsoft Excel Training Malaysia (Training Flyer)
SAMPRICE_fi
Shortsalesuccesstrainingpromo 5-17-10
Cs 1114 - lecture-5
Nesta destination local cc 070715
Hobbies and interests of industrial students in ust

Viewers also liked (20)

PDF
Techtextil India Symposium Brochure 2012
PPTX
Initial payment training
PPTX
презентация Microsoft office power point
PPTX
Nmdl final pp
PPT
PPS
Background Veil Lecture
PPS
Interesting Powerpoint
PPTX
Brochure sellin gppt 2
PPTX
test
DOCX
PDF
Hamel hasselbach weil_krumm
DOC
Astrologie cu poze
PPTX
Learning model
PDF
India forbes
PDF
EYC- Meet Mary
PPTX
May 16 webinar final
PPTX
Webquest
PDF
Jcl samples
PDF
Saertex Imagebroschuere 0909
PPT
Проросійські виступи на сході і півдні України
Techtextil India Symposium Brochure 2012
Initial payment training
презентация Microsoft office power point
Nmdl final pp
Background Veil Lecture
Interesting Powerpoint
Brochure sellin gppt 2
test
Hamel hasselbach weil_krumm
Astrologie cu poze
Learning model
India forbes
EYC- Meet Mary
May 16 webinar final
Webquest
Jcl samples
Saertex Imagebroschuere 0909
Проросійські виступи на сході і півдні України
Ad

Similar to About learning to program (20)

PPTX
UNVEILING VALUE-BASED BIDDING SECRETS FOR MAXIMUM EFFICIENCY GAIN.pptx
PPTX
SSAS and MDX
PDF
Steps to Debug a Background Job.pdf
PDF
Sap sf2.0 course www erp_examscom
PDF
Data Science and Machine Learning Using Python and Scikit-learn
PDF
Sap erp
PDF
-SAP....erp.pdfnnnjjvvffsxjkkgcffghhvcgh
PDF
SAP-ERPV2 SAP-ERPV2 SAP-ERPV2 SAP-ERPV2.pdf
DOCX
Week 1 AssignmentCIS290v61University of Phoenix Materia.docx
PPTX
11 Enhancements & Modifications.pptx
DOCX
Sap sd important interview concepts
PPT
Visual Basic
PPT
Visual Basic
PPTX
limpinpresentation-170329032435.pptx
PPTX
Building high productivity applications
DOC
MM advance setting 2018-by guangfu(David)i
PPT
3 devlp price
PPTX
Presentation55.pptxsffsdfsdfsdsdfsfsdfsf
PPT
30% Profit
PPTX
Pricing techniques for profit maximization
UNVEILING VALUE-BASED BIDDING SECRETS FOR MAXIMUM EFFICIENCY GAIN.pptx
SSAS and MDX
Steps to Debug a Background Job.pdf
Sap sf2.0 course www erp_examscom
Data Science and Machine Learning Using Python and Scikit-learn
Sap erp
-SAP....erp.pdfnnnjjvvffsxjkkgcffghhvcgh
SAP-ERPV2 SAP-ERPV2 SAP-ERPV2 SAP-ERPV2.pdf
Week 1 AssignmentCIS290v61University of Phoenix Materia.docx
11 Enhancements & Modifications.pptx
Sap sd important interview concepts
Visual Basic
Visual Basic
limpinpresentation-170329032435.pptx
Building high productivity applications
MM advance setting 2018-by guangfu(David)i
3 devlp price
Presentation55.pptxsffsdfsdfsdsdfsfsdfsf
30% Profit
Pricing techniques for profit maximization
Ad

Recently uploaded (20)

PPTX
Monitoring Stack: Grafana, Loki & Promtail
PPTX
Computer Software and OS of computer science of grade 11.pptx
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
17 Powerful Integrations Your Next-Gen MLM Software Needs
PPTX
Patient Appointment Booking in Odoo with online payment
PPTX
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
PDF
Cost to Outsource Software Development in 2025
PPTX
Advanced SystemCare Ultimate Crack + Portable (2025)
PPTX
Why Generative AI is the Future of Content, Code & Creativity?
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
iTop VPN 6.5.0 Crack + License Key 2025 (Premium Version)
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PDF
medical staffing services at VALiNTRY
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PPTX
Operating system designcfffgfgggggggvggggggggg
Monitoring Stack: Grafana, Loki & Promtail
Computer Software and OS of computer science of grade 11.pptx
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
Wondershare Filmora 15 Crack With Activation Key [2025
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
17 Powerful Integrations Your Next-Gen MLM Software Needs
Patient Appointment Booking in Odoo with online payment
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
Cost to Outsource Software Development in 2025
Advanced SystemCare Ultimate Crack + Portable (2025)
Why Generative AI is the Future of Content, Code & Creativity?
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Design an Analysis of Algorithms I-SECS-1021-03
iTop VPN 6.5.0 Crack + License Key 2025 (Premium Version)
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
medical staffing services at VALiNTRY
Design an Analysis of Algorithms II-SECS-1021-03
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Operating system designcfffgfgggggggvggggggggg

About learning to program

  • 1. ABOUT LEARNING TO PROGRAM ANNA MAKARUDZE PYCON NAMIBIA 2016 TALK 27 JANUARY 2016
  • 2. BACKGROUND – MY INTRODUCTION TO PROGRAMMING WHERE • Zimuto High School, Masvingo, Zimbabwe WHEN 1999 – 2002 Ordinary Level (GCE O’ Level), •Subject – Computer Studies •Language – BASIC/DBASE III
  • 3. STAGES 1. Define The Task/Tasks 2. Write an Algorithm/ Pseudocode 3. Write Code 4. Debug And Test 5. Deploy
  • 4. DEFINE THE TASK/TASKS •The first important task/stage in programming. •Understand what it is you are required to do. •Break down the question/project/task into small tasks. •Can use either bottom/up or top/down modular approach.
  • 5. EXAMPLE – DEFINE THE TASKS PROBLEM • Consider a sales rep of a network marketing company selling goods in ZAR but paying in USD. Calculate the USD value of order after discount. Discount rate ranges from 20% to 35% depending on order size. Forex rate uses current rate. The following discount rates apply for a given order size: DISCOUNT RATES Order Size (ZAR) Discount Rate (%) <= 900 20 901-1800 25 1801-2700 30 2701 - 35
  • 6. WRITE AN ALGORITHM/PSEUDOCODE •Step by step instructions written in a plain/natural language, e.g. English, Portuguese, etc., which show the actions to be taken in order to achieve a particular goal.
  • 7. ALGORITHM/PSEUDOCODE Start Enter the total_value of order in ZAR Enter the current_rate USD:ZAR Determine the discount rate* Calculate total value in USD* Calculate discount* Calculate amount to be paid* Return total value in ZAR, total value in USD, discount and amount to be paid End
  • 8. ALGORITHM/PSEUDOCODE – DETAILED DETERMINE DISCOUNT RATE *If total_value <=900 then discount_rate = 20% Else if total_value <= 1800 then discount_rate = 25% Else if total_value <= 2700 then discount_rate = 30% Else discount_rate = 35% End if CALCULATE TOTAL VALUE IN USD AND DISCOUNT RATE *total_value_usd = total_value / current _rate *discount = total_value _usd * discount_rate *amount_due = total_value _usd – discount
  • 9. WRITE CODE •Write the program using the syntax of the chosen programming language. •Done in the program’s development environment to enable testing. •In our case, python, using an IDE of your choice.
  • 10. IF… STATEMENT - PYTHON if total_value <=900: discount_rate = 0.20 elif total_value <= 1800: discount_rate = 0.25 elif total_value <= 2700: discount_rate = 0.30 else: discount_rate = 0.35
  • 11. IF… STATEMENT – C if (total_value <=900) { discount_rate = 0.20; } else if (total_value <= 1800) { discount_rate = 0.25; } else if (total_value <= 2700) { discount_rate = 0.30; } else { discount_rate = 0.35; }
  • 12. IF… STATEMENT – C++ if total_value <=900 { discount_rate = 0.20; } else if total_value <= 1800 { discount_rate = 0.25; } else if total_value <= 2700 { discount_rate = 0.30; } else { discount_rate = 0.35; }
  • 13. IF… STATEMENT – VISUAL BASIC If total_value <=900 Then discount_rate = 0.20 ElseIf total_value <= 1800 Then discount_rate = 0.25 ElseIf total_value <= 2700 Then discount_rate = 0.30 Else discount_rate = 0.35 End If
  • 14. COMPARISON BETWEEN PSEUDOCODE AND CODE ALGORITHM/PSEUDOCODE •Semantics – meaning of your code CODE/PROGRAM •Syntax – gramma of your code
  • 15. DEBUG AND TEST •Involves testing the program to determine if it is working as expected. •Process is repeated until the program is running without errors and giving required output. •Normally takes up most of the programmer’s time. •Code normally tends to yield unexpected results.
  • 16. DEPLOY •Package your application for deployment and start using your application. •Different languages deploy applications in a different manner. •You therefore need to know how to deploy/publish your app using your IDE.
  • 17. RESOURCES USED IN LEARNING PROGRAMMING 2000s • Textbooks • Teacher’s notes and guidance • Projects by students before you 2010 - DATE • Textbooks • Teacher’s notes and guidance • Projects by students before you • Internet - many websites, videos including Stackoverflow, Github, MVA, etc. • PyCons and many other conferences • Learning to program has never been this easy!!!