Lecture 1 Introduction to Programming, Flowcharts and Flow of Control Sequential Execution PDF
Document Details
Uploaded by Deleted User
Dr. Safa Elaskary, Dr. Manar Elshazly
Tags
Summary
This document is a lecture on introductory programming topics, focusing on Python. Key concepts like variables, data types, flowcharts and sequential execution are introduced. The document provides examples and exercises for understanding the topics taught.
Full Transcript
Structure Programming By Dr. Safa Elaskary Dr. Manar Elshazly Fall 2024-2025 1 2 Lecture 1 : Introduction to Programming, Flowcharts, and Flow of Control 1. Overview of Programming Concepts 2. Introduction to Python: 3. Fl...
Structure Programming By Dr. Safa Elaskary Dr. Manar Elshazly Fall 2024-2025 1 2 Lecture 1 : Introduction to Programming, Flowcharts, and Flow of Control 1. Overview of Programming Concepts 2. Introduction to Python: 3. Flowchart Symbols: 4. Writing Sequential Python Code: 3 1. Overview of Programming 4 5 6 2. Introduction to Python 7 8 If you agree with me that the relative popularity of a programming language matters, then Python is clearly a good choice 9 10 Where to use python? ◦ System management (i.e., scripting) ◦ Graphic User Interface (GUI) ◦ Internet programming ◦ Database (DB) programming ◦ Text data processing ◦ Distributed processing ◦ Numerical operations ◦ Graphics ◦ And so on… 11 12 13 14 Arithematic operation 15 Comparator operators 16 3. Flow Chart ◦ Flowcharts graphically represent the flow of a program. ◦ There are four basic shapes used in a flow chart. Each shape has a specific use: ◦ oval: start / end ◦ parallelogram: input / output ◦ rectangle: calculations ◦ diamond: selection structures 17 ◦ Arrows connect the basic shapes in a flowchart. The shapes and arrows of a flowchart describe the flow of a program from start to end. Flowcharts typically flow from the top to the bottom or flow from the left to the right. Below is the description of a simple program: 18 Ex1 19 Ex2 20 4. Writing Sequential Python Code: 21 22 ck Quiz A. 30 B. 1020 C. Error D. I can’t know the answer 23 Quick Quiz Order precedence 24 Quick Quiz Put True or false: 1. X = 5 assigns that 5 to the variable X 2. X==5 checks if x has value 5 25 26