Introduction to Computer Programming: Course Overview and Terminologies, Exercises of Law

An introduction to computer programming, covering programming concepts, problem-solving strategies, programming paradigms, and terminologies. Students will learn about programming languages, syntax, semantics, data types, arrays, and programming errors. The document also discusses the importance of problem-solving skills and the sequential process of analyzing and generating response options.

Typology: Exercises

2019/2020

Uploaded on 12/08/2020

odeku-olusola
odeku-olusola ๐Ÿ‡ณ๐Ÿ‡ฌ

1 document

1 / 20

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Introduction to Computer Programming
Ogunbiyi, D.T.
Faculty of Science Basic and Applied
Sciences.
Department of Information & Communication
Technology.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14

Partial preview of the text

Download Introduction to Computer Programming: Course Overview and Terminologies and more Exercises Law in PDF only on Docsity!

Introduction to Computer Programming

Ogunbiyi, D.T.

Faculty of Science Basic and Applied

Sciences.

Department of Information & Communication

Technology.

Course Description

Introduction; Programming concepts and properties, problem

solving strategies/methods, program implementation strategies,

concept and properties. Algorithm development, designing, coding,

debugging and documenting programs, programming steps,

structure, Python programming.

Course Weekly Schedule (Week 1-6)

Week 1: Introduction to Computer Programming Week 2: Programming Terminologies Week 3: Problem Solving and Design Process Week 4: Introduction to Python Programming Week 5: Python Data Types and Variables Week 6: Strings

Week 1: Introduction to Computer Programming

โ— (^) Computers can do such a wide variety of things because they can be programmed. โ— (^) Programs are instructions that allow the computer perform specific tasks โ— (^) Programming is the art of writing programs. โ— (^) All software or applications we run are programs performing tasks from text editors, to games, websites, banking applications etc.

Programming Paradigms and Languages

โ— (^) A paradigm is a standard or an approach to solve problems using a programming language. โ— (^) Types include: โ—‹ (^) Imperative programming: C; Fortran; Basic โ—‹ (^) Procedural: C; C++; Java; Pascal โ—‹ (^) Object oriented programming: Simula; Java, C++; Ruby; Python โ—‹ (^) Logic programming: prolog โ—‹ (^) Functional programming: Javascript; Lisp, Scala

Compiled Vs Interpreted Languages

โ— (^) Compilers and interpreters take human-readable code and convert it to computer-readable machine code. โ— (^) Interpreter translates one statement of a program at a time by a program (interpreter) while compiler scans the entire program and translates the whole of it by the target machine. โ— (^) Examples of compiled languages: C, C++, Go, Rust, Haskell โ— (^) Examples of interpreted languages: Python, Ruby, JavaScript, PHP

Programming Terminologies

โ— (^) Declaration: a statement describing an identifier, such as the name of a variable or a function. They are important because they inform the compiler or interpreter what the identifying word means, and how the identified thing should be used. โ— (^) Exception: A special, unexpected and anomalous condition encountered during the execution of a program. โ— (^) Libraries: A ``program library'' is simply a file containing compiled code (and data) that is to be incorporated later into a program โ— (^) Runtime: is the time period during which a program is running on a computer. โ— (^) Statement: a statement is a single line of code written legally in a programming language that expresses an action to be carried out.

Programming Errors

โ— (^) Syntax errors: A syntax error is an error in the source code of a program. Since computer programs must follow strict syntax to compile correctly, any aspects of the code that do not conform to the syntax of the programming language will produce a syntax error. E.g โ—‹ (^) Spelling mistakes โ—‹ (^) Missing quotes or brackets โ—‹ (^) Using uppercase characters in keywords โ—‹ (^) Missing out a terminating statement

Week 3: Problem Solving and Design Process

โ— (^) Sequential process of analyzing information related to a given situation and generating appropriate response options. โ— (^) In programming, problem solving is very vital to developing the best solution to given situation.

Problem Solving Steps

  1. Understand the Problem
  2. Formulate a Model
  3. Develop an Algorithm
  4. Write the Program
  5. Test the Program
  6. Evaluate the Solution

Flowchart Symbols

Example 1: Addition of two numbers

Start the program

Read first number num

Read second number num

Sum both numbers

Print result

End program

Start Read num Read num Sum = num1 + num Print sum End Pseudocode Flowchart

Control Structures

โ— (^) Sequence โ— (^) Branching/Condition โ— (^) Looping/Iteration/Repetition

Links for further reading

https://hackr.io/blog/programming-terms-definitions-for-beginners https://www.codecademy.com/articles/fwd-js-methods-functions https://www.freecodecamp.org/news/introduction-to-computer-programming-and-c omputer-science-course/ https://www.w3schools.com/python/python_ref_string.asp