SlideShare una empresa de Scribd logo
1 de 22
21/07/15 05:19 AM CSC Alliance — 1
Kimera Richard
E-mail: rkimera@must.ac.ug
Phone: 0701 437989
INSTITUTE OF COMPUTER SCIENCE
DEPARTMENT OF INFORMATION SYSTEMS AND TECHNOLOGY
Intro to Computer Programming
http://Westechies.blogspot.com
http://kimrichies.blogspot.com
MUST- ICS rkimera@must.ac.ug
What is a program
A sequence of instructions that a computer can interpret
and execute;
 If I tell you the way from ICS to Administration Block … I will tell
sequence of instructions…. Any wrong instruction leads to a
undesired result.
A program is something that runs on your computer. In
case of MS Windows program is of .EXE or .COM
extensions
MS Word, Power point, Excel are all computer programs
MUST- ICS rkimera@must.ac.ug
Discussion Question:
How advantageous is Computer
Programming in relation to National
development?
MUST- ICS rkimera@must.ac.ug
Programming Concepts
Data Types
Variables
Operators
Conditional Statements
Looping Statements
Functions and working with Files
Application programming Interfaces (API’s)
e.t.c
MUST- ICS rkimera@must.ac.ug
Data Types and Variables
Data Type: It is basically a scheme for representing data OR data
storage location e.g Int, String, float, boolean, byte, e.t.c
A variable is a named data storage location in your computer's
memory. By using a variable's name in your program, you are, in
effect, referring to the data stored there.
MUST- ICS rkimera@must.ac.ug
Operators
 Operators are symbols which take one or more operands or
expressions and perform arithmetic or logical computations.
 E.g +, -, *, /, %, =, ++, - -. ==, <, >, //, &&
 Operands are variables or expressions which are used in
conjunction with operators to evaluate the expression.
 Combination of operands and operators form an expression.
MUST- ICS rkimera@must.ac.ug
Conditional Statements
If…else statement – Tests if a certain condition
is true/ false and executes a given statement
Switch Statement – Similary works as the
if..else statement
MUST- ICS rkimera@must.ac.ug
Looping Statements
Executes a certain condition and loops up to
when the set condition is met
Examples of statement include;
While loop
Do…….while
Break and continue
goto
for
MUST- ICS rkimera@must.ac.ug
Functions/Methods
Functions/Methods are independent
sections in a code that perform some
specific task and optionally returns a value
when called
The help break a complex problem or
task into a smaller portions
MUST- ICS rkimera@must.ac.ug
Writing Computer Programs
A programmer uses an editor to create or modify files
containing C code e.g Notepad, Codeblocks, Visual
studio, Android studio, e.t.c
Code is also known as source code.
After a source file/Project has been created, the
programmer must invoke the compiler before the
program can be executed (run).
For advanced IDE’s(Integrated Drive Electronics), the
program is compiled as you code.
MUST- ICS rkimera@must.ac.ug
Introduction to programming languages
Programming languages can be;
Server side languagesServer side languages – Code is stored on the server
and accessed by a clied basically through the browser.
E.g php
Client side languagesClient side languages – code can be stored on either the
client or server e.g HTML
Interpreted languagesInterpreted languages – Code will execute even if it
contains errors, no compile is needed e.g HTML
Compiled languagesCompiled languages – Code will not execute/run if the
compile fails to understand some statements e.g C, Java
Any more???
MUST- ICS rkimera@must.ac.ug
Categories of Programming languages
Procedure languagesProcedure languages – Follow a step by step program execution
e.g C, C++, e.t.c
Object Oriented Programming languagesObject Oriented Programming languages – Classes are used a data
types for Objects.
Event Driven Languages-Event Driven Languages- The program runs basing on user actions,
this is common in GUI programming. Events can be generated
when a user clicks a button, touches the scroon, moves a mouse,
types on the key board, etc. Examples… Java, Visual Basic, C++.
OO Php
Scripting languagesScripting languages – light weight languages e.g php, python,
javascript
Mobile programming language –Mobile programming language – Light weight languages that run on
mobile devices e.g Android, windows OS, swift/Objective C,
Symbian, WebOS, Blackberry OS.
MUST- ICS rkimera@must.ac.ug
Programming support Tools
Basic Editors e.g Notepad, Notepad ++
IDE’s (WYSIWYG) e.g Netbeans,
Dreamweaver, Codeblocks
Content management systems e.g Joomla,
Wordpress, Drupal, etc
Mockups – pencil, fireworks, etc
MUST- ICS rkimera@must.ac.ug
Example of program written in C
#include <stdio.h>
int main( void )
{
int value1, value2, product ;
printf(“Enter two integer values: “) ;
scanf(“%d%d”, &value1, &value2) ;
product = value1 * value2 ;
printf(“Product = %dn”, product) ;
return 0 ;
}
MUST- ICS rkimera@must.ac.ug
Example of program written in Java
/* Sample Java Program */
public class Sample
{
public static void main (String []
args)
{
int i;
for (i = 1; i <= 10; i++)
{
System.out.println
("Number: " + i);
}
}
}
MUST- ICS rkimera@must.ac.ug
Example of program written in Objective C
#import <Foundation/Foundation.h>
int main() {
/* my first program in Objective-C */
NSLog(@"Hello, World! n");
return 0;
}
Source:
http://www.tutorialspoint.com/objective_c/objective_c
_environment_setup.htm
MUST- ICS rkimera@must.ac.ug
Example of program written in Android
package com.example.kim.myapplication;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
public class MainActivity extends ActionBarActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
}
return super.onOptionsItemSelected(item);
}
}
MUST- ICS rkimera@must.ac.ug
Programming Languages
MUST- ICS rkimera@must.ac.ug
Discussion Question
If we are to teach Computer programming in
Secondary Schools, which one of the above
programming languages would be simpler
Lets think about the our school labs and resources
available
MUST- ICS rkimera@must.ac.ug
Scratch Is one of the best! Was it on the list?
MUST- ICS rkimera@must.ac.ug
QUESTIONS
What do you think could be the best
way of teaching computer
programming in your school?
MUST- ICS rkimera@must.ac.ug

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Lesson 2: Introduction to C#
Lesson 2: Introduction to C#Lesson 2: Introduction to C#
Lesson 2: Introduction to C#
 
10 lesson8
10 lesson810 lesson8
10 lesson8
 
Ict - Programming
Ict - ProgrammingIct - Programming
Ict - Programming
 
Programming paradigm and web programming
Programming paradigm and web programmingProgramming paradigm and web programming
Programming paradigm and web programming
 
10 lesson7
10 lesson710 lesson7
10 lesson7
 
Programming Language
Programming LanguageProgramming Language
Programming Language
 
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi
 
Required computer skills program devlopment
Required computer skills program devlopmentRequired computer skills program devlopment
Required computer skills program devlopment
 
Java Tutorial: Part 2. IntelliJ IDEA
Java Tutorial: Part 2. IntelliJ IDEAJava Tutorial: Part 2. IntelliJ IDEA
Java Tutorial: Part 2. IntelliJ IDEA
 
Programming language
Programming languageProgramming language
Programming language
 
Programming language
Programming languageProgramming language
Programming language
 
10 lesson6
10 lesson610 lesson6
10 lesson6
 
introduction to assembly language.
introduction to assembly language.introduction to assembly language.
introduction to assembly language.
 
INTRODUCTIONS OF HTML
INTRODUCTIONS OF HTMLINTRODUCTIONS OF HTML
INTRODUCTIONS OF HTML
 
what is assembly language by faisal shahzad
what is assembly language by faisal shahzadwhat is assembly language by faisal shahzad
what is assembly language by faisal shahzad
 
Ic lecture8
Ic lecture8 Ic lecture8
Ic lecture8
 
AMIT PATIL- Embedded OS Professional
AMIT PATIL- Embedded OS ProfessionalAMIT PATIL- Embedded OS Professional
AMIT PATIL- Embedded OS Professional
 
Programming lesson1
Programming lesson1Programming lesson1
Programming lesson1
 
What is Coding
What is CodingWhat is Coding
What is Coding
 
Generation of computer languages
Generation of computer languagesGeneration of computer languages
Generation of computer languages
 

Destacado

Introduction to scratch
Introduction to scratchIntroduction to scratch
Introduction to scratchKimera Richard
 
Computer science clubs in schools
Computer science clubs in schoolsComputer science clubs in schools
Computer science clubs in schoolsKimera Richard
 
Open source educational technologies for teaching and learning
Open source educational technologies for teaching and learningOpen source educational technologies for teaching and learning
Open source educational technologies for teaching and learningKimera Richard
 
Depict and deduce plus conditional statements
Depict and deduce plus conditional statementsDepict and deduce plus conditional statements
Depict and deduce plus conditional statementsKimera Richard
 
An Introduction to CS4HS
An Introduction to CS4HSAn Introduction to CS4HS
An Introduction to CS4HSKimera Richard
 
Resource List for Motivating Boys to Read
Resource List for Motivating Boys to ReadResource List for Motivating Boys to Read
Resource List for Motivating Boys to Readcck008
 
Motivating Boys to Succeed Academically
Motivating Boys to Succeed AcademicallyMotivating Boys to Succeed Academically
Motivating Boys to Succeed AcademicallyGrand River Academy
 
Mobile predictions 2017: 76 predictions from 76 marketing influencers
Mobile predictions 2017: 76 predictions from 76 marketing influencersMobile predictions 2017: 76 predictions from 76 marketing influencers
Mobile predictions 2017: 76 predictions from 76 marketing influencersTUNE
 
Launching Next-Generation Supply Chain Leader Training by Supply Chain Insights
Launching Next-Generation Supply Chain Leader Training by Supply Chain InsightsLaunching Next-Generation Supply Chain Leader Training by Supply Chain Insights
Launching Next-Generation Supply Chain Leader Training by Supply Chain InsightsLora Cecere
 
South East Asia Digital & Mobile Scene in 2017*
South East Asia Digital & Mobile Scene in 2017*South East Asia Digital & Mobile Scene in 2017*
South East Asia Digital & Mobile Scene in 2017*Robin Ng
 
10 E-Learning Trends to watch in 2016
10 E-Learning Trends to watch in 201610 E-Learning Trends to watch in 2016
10 E-Learning Trends to watch in 2016Aurion Learning
 
The Creative Classroom
The Creative ClassroomThe Creative Classroom
The Creative ClassroomJohn Spencer
 
Free Download Powerpoint Slides
Free Download Powerpoint SlidesFree Download Powerpoint Slides
Free Download Powerpoint SlidesGeorge
 
Can We Assess Creativity?
Can We Assess Creativity?Can We Assess Creativity?
Can We Assess Creativity?John Spencer
 

Destacado (17)

Introduction to scratch
Introduction to scratchIntroduction to scratch
Introduction to scratch
 
Computer science clubs in schools
Computer science clubs in schoolsComputer science clubs in schools
Computer science clubs in schools
 
Open source educational technologies for teaching and learning
Open source educational technologies for teaching and learningOpen source educational technologies for teaching and learning
Open source educational technologies for teaching and learning
 
Depict and deduce plus conditional statements
Depict and deduce plus conditional statementsDepict and deduce plus conditional statements
Depict and deduce plus conditional statements
 
An Introduction to CS4HS
An Introduction to CS4HSAn Introduction to CS4HS
An Introduction to CS4HS
 
Resource List for Motivating Boys to Read
Resource List for Motivating Boys to ReadResource List for Motivating Boys to Read
Resource List for Motivating Boys to Read
 
Motivating Boys to Succeed Academically
Motivating Boys to Succeed AcademicallyMotivating Boys to Succeed Academically
Motivating Boys to Succeed Academically
 
Future of Mobile
Future of Mobile Future of Mobile
Future of Mobile
 
Mobile predictions 2017: 76 predictions from 76 marketing influencers
Mobile predictions 2017: 76 predictions from 76 marketing influencersMobile predictions 2017: 76 predictions from 76 marketing influencers
Mobile predictions 2017: 76 predictions from 76 marketing influencers
 
Launching Next-Generation Supply Chain Leader Training by Supply Chain Insights
Launching Next-Generation Supply Chain Leader Training by Supply Chain InsightsLaunching Next-Generation Supply Chain Leader Training by Supply Chain Insights
Launching Next-Generation Supply Chain Leader Training by Supply Chain Insights
 
South East Asia Digital & Mobile Scene in 2017*
South East Asia Digital & Mobile Scene in 2017*South East Asia Digital & Mobile Scene in 2017*
South East Asia Digital & Mobile Scene in 2017*
 
Scratch pp ohrid
Scratch pp ohridScratch pp ohrid
Scratch pp ohrid
 
10 E-Learning Trends to watch in 2016
10 E-Learning Trends to watch in 201610 E-Learning Trends to watch in 2016
10 E-Learning Trends to watch in 2016
 
The Creative Classroom
The Creative ClassroomThe Creative Classroom
The Creative Classroom
 
Free Download Powerpoint Slides
Free Download Powerpoint SlidesFree Download Powerpoint Slides
Free Download Powerpoint Slides
 
Can We Assess Creativity?
Can We Assess Creativity?Can We Assess Creativity?
Can We Assess Creativity?
 
Slideshare ppt
Slideshare pptSlideshare ppt
Slideshare ppt
 

Similar a Introduction to programming

SystemsProgrammingCourse FSDFFSFDSDSDSFSFS
SystemsProgrammingCourse FSDFFSFDSDSDSFSFSSystemsProgrammingCourse FSDFFSFDSDSDSFSFS
SystemsProgrammingCourse FSDFFSFDSDSDSFSFSmeharikiros2
 
Into To Solve Problem And Computer Programming
Into To Solve Problem And Computer ProgrammingInto To Solve Problem And Computer Programming
Into To Solve Problem And Computer ProgrammingAhmed Elnemr
 
Bsc cs i pic u-1 introduction to c language
Bsc cs i pic u-1 introduction to c languageBsc cs i pic u-1 introduction to c language
Bsc cs i pic u-1 introduction to c languageRai University
 
introduction to c language
 introduction to c language introduction to c language
introduction to c languageRai University
 
Busy Developer's Guide to Windows 8 HTML/JavaScript Apps
Busy Developer's Guide to Windows 8 HTML/JavaScript AppsBusy Developer's Guide to Windows 8 HTML/JavaScript Apps
Busy Developer's Guide to Windows 8 HTML/JavaScript AppsJAX London
 
Mca i pic u-1 introduction to c language
Mca i pic u-1 introduction to c languageMca i pic u-1 introduction to c language
Mca i pic u-1 introduction to c languageRai University
 
Summer training PPT Manasv Singharia.pptx
Summer training PPT Manasv Singharia.pptxSummer training PPT Manasv Singharia.pptx
Summer training PPT Manasv Singharia.pptxshokeenk14
 
Diploma ii cfpc u-1 introduction to c language
Diploma ii  cfpc u-1 introduction to c languageDiploma ii  cfpc u-1 introduction to c language
Diploma ii cfpc u-1 introduction to c languageRai University
 
Learn C Programming Full Course Free
Learn C Programming Full Course FreeLearn C Programming Full Course Free
Learn C Programming Full Course FreeDheeraj Patidar
 
Btech i pic u-1 introduction to c language
Btech i pic u-1 introduction to c languageBtech i pic u-1 introduction to c language
Btech i pic u-1 introduction to c languageRai University
 

Similar a Introduction to programming (20)

MSalah_20161010
MSalah_20161010MSalah_20161010
MSalah_20161010
 
Resume
ResumeResume
Resume
 
Chapter no 1
Chapter no 1Chapter no 1
Chapter no 1
 
SystemsProgrammingCourse FSDFFSFDSDSDSFSFS
SystemsProgrammingCourse FSDFFSFDSDSDSFSFSSystemsProgrammingCourse FSDFFSFDSDSDSFSFS
SystemsProgrammingCourse FSDFFSFDSDSDSFSFS
 
C# Fundamental
C# FundamentalC# Fundamental
C# Fundamental
 
Into To Solve Problem And Computer Programming
Into To Solve Problem And Computer ProgrammingInto To Solve Problem And Computer Programming
Into To Solve Problem And Computer Programming
 
eswar.pptx
eswar.pptxeswar.pptx
eswar.pptx
 
Bsc cs i pic u-1 introduction to c language
Bsc cs i pic u-1 introduction to c languageBsc cs i pic u-1 introduction to c language
Bsc cs i pic u-1 introduction to c language
 
C++ programming
C++ programmingC++ programming
C++ programming
 
gurpreet.pptx
gurpreet.pptxgurpreet.pptx
gurpreet.pptx
 
introduction to c language
 introduction to c language introduction to c language
introduction to c language
 
L01 Enterprise Application Architecture
L01 Enterprise Application ArchitectureL01 Enterprise Application Architecture
L01 Enterprise Application Architecture
 
Busy Developer's Guide to Windows 8 HTML/JavaScript Apps
Busy Developer's Guide to Windows 8 HTML/JavaScript AppsBusy Developer's Guide to Windows 8 HTML/JavaScript Apps
Busy Developer's Guide to Windows 8 HTML/JavaScript Apps
 
Mca i pic u-1 introduction to c language
Mca i pic u-1 introduction to c languageMca i pic u-1 introduction to c language
Mca i pic u-1 introduction to c language
 
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C Programming
 
Summer training PPT Manasv Singharia.pptx
Summer training PPT Manasv Singharia.pptxSummer training PPT Manasv Singharia.pptx
Summer training PPT Manasv Singharia.pptx
 
Diploma ii cfpc u-1 introduction to c language
Diploma ii  cfpc u-1 introduction to c languageDiploma ii  cfpc u-1 introduction to c language
Diploma ii cfpc u-1 introduction to c language
 
Learn C Programming Full Course Free
Learn C Programming Full Course FreeLearn C Programming Full Course Free
Learn C Programming Full Course Free
 
Btech i pic u-1 introduction to c language
Btech i pic u-1 introduction to c languageBtech i pic u-1 introduction to c language
Btech i pic u-1 introduction to c language
 
CVInDoc2017
CVInDoc2017CVInDoc2017
CVInDoc2017
 

Más de Kimera Richard

Relevancy of STEM and Computing
Relevancy of STEM and Computing Relevancy of STEM and Computing
Relevancy of STEM and Computing Kimera Richard
 
Using triggers in my sql database
Using triggers in my sql databaseUsing triggers in my sql database
Using triggers in my sql databaseKimera Richard
 
Science, Technology, Engineering and Mathematics (STEM) Courses
Science, Technology, Engineering and Mathematics (STEM) CoursesScience, Technology, Engineering and Mathematics (STEM) Courses
Science, Technology, Engineering and Mathematics (STEM) CoursesKimera Richard
 
STEM and National Development
STEM and National DevelopmentSTEM and National Development
STEM and National DevelopmentKimera Richard
 
Science, Technology, Engineering and Mathematics (STEM) careers
Science, Technology, Engineering and Mathematics (STEM) careers Science, Technology, Engineering and Mathematics (STEM) careers
Science, Technology, Engineering and Mathematics (STEM) careers Kimera Richard
 
How to Use Google groups
How to Use Google groupsHow to Use Google groups
How to Use Google groupsKimera Richard
 
Open source educational technologies for teaching and learning
Open source educational technologies for teaching and learningOpen source educational technologies for teaching and learning
Open source educational technologies for teaching and learningKimera Richard
 
Embracing computing in Secondary schools
Embracing computing in Secondary schoolsEmbracing computing in Secondary schools
Embracing computing in Secondary schoolsKimera Richard
 

Más de Kimera Richard (12)

Relevancy of STEM and Computing
Relevancy of STEM and Computing Relevancy of STEM and Computing
Relevancy of STEM and Computing
 
Stem opportunities
Stem opportunitiesStem opportunities
Stem opportunities
 
Role modeling
Role modelingRole modeling
Role modeling
 
Using triggers in my sql database
Using triggers in my sql databaseUsing triggers in my sql database
Using triggers in my sql database
 
Science, Technology, Engineering and Mathematics (STEM) Courses
Science, Technology, Engineering and Mathematics (STEM) CoursesScience, Technology, Engineering and Mathematics (STEM) Courses
Science, Technology, Engineering and Mathematics (STEM) Courses
 
Life Matters
Life MattersLife Matters
Life Matters
 
STEM and National Development
STEM and National DevelopmentSTEM and National Development
STEM and National Development
 
Science, Technology, Engineering and Mathematics (STEM) careers
Science, Technology, Engineering and Mathematics (STEM) careers Science, Technology, Engineering and Mathematics (STEM) careers
Science, Technology, Engineering and Mathematics (STEM) careers
 
How to Use Google groups
How to Use Google groupsHow to Use Google groups
How to Use Google groups
 
Open source educational technologies for teaching and learning
Open source educational technologies for teaching and learningOpen source educational technologies for teaching and learning
Open source educational technologies for teaching and learning
 
Embracing computing in Secondary schools
Embracing computing in Secondary schoolsEmbracing computing in Secondary schools
Embracing computing in Secondary schools
 
Gender and computing
Gender and computingGender and computing
Gender and computing
 

Último

Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 

Último (20)

Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 

Introduction to programming

  • 1. 21/07/15 05:19 AM CSC Alliance — 1 Kimera Richard E-mail: rkimera@must.ac.ug Phone: 0701 437989 INSTITUTE OF COMPUTER SCIENCE DEPARTMENT OF INFORMATION SYSTEMS AND TECHNOLOGY Intro to Computer Programming http://Westechies.blogspot.com http://kimrichies.blogspot.com
  • 2. MUST- ICS rkimera@must.ac.ug What is a program A sequence of instructions that a computer can interpret and execute;  If I tell you the way from ICS to Administration Block … I will tell sequence of instructions…. Any wrong instruction leads to a undesired result. A program is something that runs on your computer. In case of MS Windows program is of .EXE or .COM extensions MS Word, Power point, Excel are all computer programs
  • 3. MUST- ICS rkimera@must.ac.ug Discussion Question: How advantageous is Computer Programming in relation to National development?
  • 4. MUST- ICS rkimera@must.ac.ug Programming Concepts Data Types Variables Operators Conditional Statements Looping Statements Functions and working with Files Application programming Interfaces (API’s) e.t.c
  • 5. MUST- ICS rkimera@must.ac.ug Data Types and Variables Data Type: It is basically a scheme for representing data OR data storage location e.g Int, String, float, boolean, byte, e.t.c A variable is a named data storage location in your computer's memory. By using a variable's name in your program, you are, in effect, referring to the data stored there.
  • 6. MUST- ICS rkimera@must.ac.ug Operators  Operators are symbols which take one or more operands or expressions and perform arithmetic or logical computations.  E.g +, -, *, /, %, =, ++, - -. ==, <, >, //, &&  Operands are variables or expressions which are used in conjunction with operators to evaluate the expression.  Combination of operands and operators form an expression.
  • 7. MUST- ICS rkimera@must.ac.ug Conditional Statements If…else statement – Tests if a certain condition is true/ false and executes a given statement Switch Statement – Similary works as the if..else statement
  • 8. MUST- ICS rkimera@must.ac.ug Looping Statements Executes a certain condition and loops up to when the set condition is met Examples of statement include; While loop Do…….while Break and continue goto for
  • 9. MUST- ICS rkimera@must.ac.ug Functions/Methods Functions/Methods are independent sections in a code that perform some specific task and optionally returns a value when called The help break a complex problem or task into a smaller portions
  • 10. MUST- ICS rkimera@must.ac.ug Writing Computer Programs A programmer uses an editor to create or modify files containing C code e.g Notepad, Codeblocks, Visual studio, Android studio, e.t.c Code is also known as source code. After a source file/Project has been created, the programmer must invoke the compiler before the program can be executed (run). For advanced IDE’s(Integrated Drive Electronics), the program is compiled as you code.
  • 11. MUST- ICS rkimera@must.ac.ug Introduction to programming languages Programming languages can be; Server side languagesServer side languages – Code is stored on the server and accessed by a clied basically through the browser. E.g php Client side languagesClient side languages – code can be stored on either the client or server e.g HTML Interpreted languagesInterpreted languages – Code will execute even if it contains errors, no compile is needed e.g HTML Compiled languagesCompiled languages – Code will not execute/run if the compile fails to understand some statements e.g C, Java Any more???
  • 12. MUST- ICS rkimera@must.ac.ug Categories of Programming languages Procedure languagesProcedure languages – Follow a step by step program execution e.g C, C++, e.t.c Object Oriented Programming languagesObject Oriented Programming languages – Classes are used a data types for Objects. Event Driven Languages-Event Driven Languages- The program runs basing on user actions, this is common in GUI programming. Events can be generated when a user clicks a button, touches the scroon, moves a mouse, types on the key board, etc. Examples… Java, Visual Basic, C++. OO Php Scripting languagesScripting languages – light weight languages e.g php, python, javascript Mobile programming language –Mobile programming language – Light weight languages that run on mobile devices e.g Android, windows OS, swift/Objective C, Symbian, WebOS, Blackberry OS.
  • 13. MUST- ICS rkimera@must.ac.ug Programming support Tools Basic Editors e.g Notepad, Notepad ++ IDE’s (WYSIWYG) e.g Netbeans, Dreamweaver, Codeblocks Content management systems e.g Joomla, Wordpress, Drupal, etc Mockups – pencil, fireworks, etc
  • 14. MUST- ICS rkimera@must.ac.ug Example of program written in C #include <stdio.h> int main( void ) { int value1, value2, product ; printf(“Enter two integer values: “) ; scanf(“%d%d”, &value1, &value2) ; product = value1 * value2 ; printf(“Product = %dn”, product) ; return 0 ; }
  • 15. MUST- ICS rkimera@must.ac.ug Example of program written in Java /* Sample Java Program */ public class Sample { public static void main (String [] args) { int i; for (i = 1; i <= 10; i++) { System.out.println ("Number: " + i); } } }
  • 16. MUST- ICS rkimera@must.ac.ug Example of program written in Objective C #import <Foundation/Foundation.h> int main() { /* my first program in Objective-C */ NSLog(@"Hello, World! n"); return 0; } Source: http://www.tutorialspoint.com/objective_c/objective_c _environment_setup.htm
  • 17. MUST- ICS rkimera@must.ac.ug Example of program written in Android package com.example.kim.myapplication; import android.support.v7.app.ActionBarActivity; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; public class MainActivity extends ActionBarActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_main, menu); return true; } return super.onOptionsItemSelected(item); } }
  • 19. MUST- ICS rkimera@must.ac.ug Discussion Question If we are to teach Computer programming in Secondary Schools, which one of the above programming languages would be simpler Lets think about the our school labs and resources available
  • 20. MUST- ICS rkimera@must.ac.ug Scratch Is one of the best! Was it on the list?
  • 21. MUST- ICS rkimera@must.ac.ug QUESTIONS What do you think could be the best way of teaching computer programming in your school?