Official government website of the Government of Kingdom of Saudi Arabia
Link to official Saudi websites end with edu.sa

All links to official educational websites in the Kingdom of Saudi Arabia end with sch.sa or edu.sa

Government websites use the HTTPS protocol for encryption and security.

Secure websites in the Kingdom of Saudi Arabia use the HTTPS protocol for encryption.

Registered with the Digital Government Authority under number:

20250417892

Computer Programming in Python

CS1011
3 hours English

Computer Programming in Python

Computer Programming in Python
1 Introduction to Python and Basic Syntax: / Introduction to Python and its ecosystem / Python installation, IDE setup (VSCode, Jupyter, etc.) / Basic syntax: variables, keywords, and expressions / Data types: integers, floats, and strings / Basic input/output (print, input) / Lab: / Install Python and a development environment (e.g., Anaconda or Jupyter Notebook) / Write simple Python scripts: “Hello, World!”, basic arithmetic, and user input/output
2 Variables, Expressions, and Control Flow: / Variables, assignment, and naming conventions / Arithmetic operations and precedence / Conditional statements (`if`, `elif`, `else`) / Comparison operators (==, !=, <, >, etc.) / Lab: / Write programs to perform simple calculations based on user input / Implement a simple number guessing game using `if` conditions
3 Loops (For and While): / Introduction to loops: `for` and `while` loops / Using `range()` with `for` loops / Infinite loops and loop control with `break`, `continue`, and `else` / Lab: / Write programs using loops: summing numbers, factorial, counting even/odd numbers / Practice with `while` loops for creating interactive programs
4 Functions: / Defining functions and calling functions / Function parameters, return values, and scope (local vs global) / Basic recursion / Lab: / Create simple functions for mathematical operations (e.g., area of a circle, power function) / Write a recursive function (e.g., Fibonacci sequence, factorial)
5 Lists and List Operations: / Introduction to lists (creation, indexing, and slicing) / List methods: `append()`, `extend()`, `remove()`, `pop()`, `sort()` / Iterating over lists with `for` loops / List comprehensions / Lab: / Practice list operations (e.g., store and manipulate lists of numbers, and strings) / Create a program that processes a list of student grades or temperatures
6 Tuples and Sets: / Introduction to tuples (immutable sequences) / Use cases and advantages of tuples over lists / Introduction to sets (unordered, unique elements) / Set operations: union, intersection, difference / Lab: / Write programs using tuples for storing immutable data / Use sets to handle unique values (e.g., finding common elements in two lists)
7 Dictionaries: / Introduction to dictionaries (key-value pairs) / Adding, removing, and accessing dictionary elements / Dictionary methods: `keys()`, `values()`, `items()` / Iterating through dictionaries / Lab: / Write programs that use dictionaries for storing information (e.g., word frequency counter, student records) / Practice manipulating dictionaries with basic methods
8 Working with Files: / Reading from and writing to text files / File handling modes (`r`, `w`, `a`) / Working with file objects / Handling file errors using `try-except` / Lab: / Write a program that reads input from a file and processes it / Implement a program that logs output to a file (e.g., save user inputs)
9 Introduction to NumPy (Numerical Computing): / Introduction to NumPy and arrays / Creating arrays and array indexing / Array operations: element-wise arithmetic, broadcasting / Basic linear algebra operations using NumPy / Lab: / Install NumPy and create basic arrays / Perform operations on NumPy arrays (e.g., matrix addition, element-wise multiplication)
10 Introduction to Pandas (Data Manipulation): / Introduction to Pandas and DataFrames / Loading, exploring, and cleaning data with Pandas / Indexing, slicing, and filtering data / Basic data analysis with Pandas / Lab: / Load datasets using Pandas and perform data-cleaning tasks / Write programs to analyze simple datasets (e.g., summary statistics, missing data handling)
11 Introduction to Data Visualization (Matplotlib): / Introduction to Matplotlib for data visualization / Creating basic plots: line, scatter, bar charts / Customizing plots: titles, labels, legends / Plotting multiple graphs and subplots / Lab: / Create various plots using Matplotlib (e.g., bar chart, line chart) / Visualize datasets (e.g., plot distributions or correlations)
12 Introduction to Statistics and Probability: / Basic statistical concepts: mean, median, mode, variance, standard deviation / Probability basics: events, random variables / Basic probability distributions (e.g., uniform, normal) / Using `scipy.stats` for statistical analysis / Lab: / Write Python programs to compute descriptive statistics / Simulate basic probability distributions using `random` module
13 Introduction to Machine Learning with Scikit-Learn: / Overview of machine learning (supervised and unsupervised learning) / Introduction to Scikit-Learn library / Basic machine learning workflow: loading data, training a model, making predictions / Linear regression example / Lab: / Use Scikit-Learn to implement a simple linear regression model / Perform basic evaluation of the model (e.g., using mean squared error)
14 Data Preprocessing for Machine Learning: / Importance of data preprocessing / Feature scaling: normalization, standardization / Handling missing data and encoding categorical variables / Train-test split and cross-validation / Lab: / Apply preprocessing steps on real-world datasets (e.g., scaling, handling missing values) / Split data into training and testing sets, and implement basic cross-validation
15 Final Project and Course Review: / Review key topics covered in the course / Best practices in Python programming and data handling / Introduction to more advanced Python topics (if applicable) / Lab: / Final project: Students will implement a small AI-related project using Python (e.g., a basic recommendation system, classification model, or regression task) / Peer review of final projects and feedback
1.1 Mapped to: K1, k2

Understand foundational Python programming concepts such as variables, data types, and control structures to develop and debug effective code.

Teaching Strategy Lectures, lab sessions, hands-on coding practice.
Assessment Methods Quizzes, midterm exams, final exams, lab exercises
1.2 Mapped to: K1, k3

Explain the principles of essential data structures (lists, tuples, sets, and dictionaries) and their application in solving computational problems.

Teaching Strategy Lectures, lab sessions, guided discussions
Assessment Methods Homework assignments, quizzes, final exams.
1.3 Mapped to: K1, K2

Describe the fundamental techniques for data analysis and visualization, including the use of libraries like NumPy, Pandas, and Matplotlib to interpret and present data effectively.

Teaching Strategy Lectures, lab sessions, project-based learning
Assessment Methods Lab project, quizzes, midterm exams, final exams
2.1 Mapped to: S1, S2

Develop and debug Python programs using appropriate coding standards and best practices to solve computational problems.

Teaching Strategy Lab sessions, hands-on exercises, project-based learning
Assessment Methods Lab exercises, lab project, homework assignments
2.2 Mapped to: S1, S2, S3

Apply Python libraries such as NumPy, Pandas, and Matplotlib to manipulate, analyze, and visualize data for practical applications.

Teaching Strategy Lab sessions, lectures, guided coding activities
Assessment Methods Lab exercises, lab project, midterm exams, final exams
2.3 Mapped to: S1, S4

Construct predictive models using Scikit-Learn, demonstrating the ability to apply basic machine learning techniques to solve real-world problems.

Teaching Strategy Lab sessions, project-based learning, problem-solving workshops
Assessment Methods Lab project, homework assignments, final exams
3.1 Mapped to: V1

Demonstrate ethical responsibility in writing, debugging, and sharing Python programs, ensuring accuracy and integrity in code development and data analysis.

Teaching Strategy Lectures on ethics, reflective discussions, project-based learning
Assessment Methods Lab project, homework assignments
3.2 Mapped to: V3

Engage in independent problem-solving, applying Python programming and machine learning techniques to address real-world challenges effectively.

Teaching Strategy Lab sessions, individual assignments, self-guided projects
Assessment Methods Lab project, homework assignments, quizzes
3.3 Mapped to: V2

Collaborate effectively in team-based projects, utilizing Python to develop and present solutions, while respecting diverse perspectives and contributions.

Teaching Strategy Team projects, collaborative lab sessions, peer feedback
Assessment Methods Lab project, peer evaluation, quizzes