CT4029 Principles of Programming (FHM FHM_SEM1 - 2023/24) 📓
- Module Tutor: Nasreen Anjum (Dr) 👩🏫
- Name: Mohammad Mehdi Kadkoodazadeh 👨🎓
- Student Number: 4326630 🎓
- Email: mohammadkadkhodazadeh@connect.glos.ac.uk 📧
If you are a student and want to collaborate or have a question don't hesitate to message me on WhatsApp! +98 9025635100
-
Session 1 - Introduction to Computer Architecture and Programming basics in Python 💻
- Exercise 1: Km_to_Miles_Converter.py
- Exercise 2: Celsius_to_Fahrenheit_Converter.py
- Exercise 3: Retirement_Age.py
-
Session 2 - Control Structure: Loops, Switches and Conditional Statements in Python ➿
- Exercise 1: Even_From_100_to_2.py
- Exercise 2: Triangle_Finder.py
- Exercise 3: Factor_Finder.py
- Exercise 4: Astrological_Sign.py
- Exercise 5: Prime_Printer.py
- Exercise 6: Dog_Years.py
-
Session 3 - Code Reusability and Functions in Python ♻️
- Exercise 1: Triangle_Maker.py
- Exercise 2: Net_Salary.py
- Exercise 3: Triangle_Calculator.py
-
Session 4 - Graphical User Interface in Python 🖥️
- Exercise 1: square_root_GUI.py
- Exercise 2: multi_calculator.py
- Exercise 3: gui_calculator.py
- Exercise 4: miles_to_kilometers _slider.py
-
Session 5 - SQLite Database in Python 💾
- Exercise 1: Employee_Database_Creation.py
- Exercise 2: Retriev_ All.py
- Exercise 3: Retrieve_Managers.py
- Exercise 4: Manager_to_Technition.py
- Exercise 5: Delete_Technicians.py
- Exercise 6: IT_Extention.py
- Exercise 7: Employee_GUI.py
-
Session 6 - Basics of Data Structures in Python 📈
- Exercise 1: anagram_finder.py
- Exercise 2: count_until_tuple.py
- Exercise 3: list_frequency.py
- Exercise 4: common_element_in_list.py
- Exercise 5: duplicate_remover.py
- Exercise 6: grades_calculator.py
-
Session 7 - Working with Files in Python 📁
- Exercise 1: line_to_list.py
- Exercise 2: file_word_frequency.py
- Exercise 3: user_info_to_file.py
- Exercise 4: bounes_adder.py
- Exercise 5: role_to_responsibility.py
-
Session 8 - Pandas for Data analysis in Python 📊
-
Exercise 1: file_application_import.py
-
Exercise 2: print_select_columns.py
-
Exercise 3: sum_mean_max_min_Touches.py
-
Exercise 4: import_skip_first_20.py
-
Exercise 5: import_last_10.py
-
Exercise 6.1: rating_more_then_80.py
-
Exercise 6.2: rating_more_then_80_and_Total_Successful_Passes.py
-
Exercise 7: specific_player_finder.py
-
Exercise 8: 2016_finder.py
-
Exercise 9: index_by_Successful_Passes_Own_Half.py
-
Exercise 10: histogram.py
-
Session 9 - Arrays and Data Visualisation in Python 🔢
-
Exercise 1: four_zeros_array.py
-
Exercise 2: one_to_five.py
-
Exercise 3: nine_zeros.py
-
Exercise 4: ten_to_fourthy_nine.py
-
Exercise 5: matrix_creator.py
-
Exercise 6: matrix_mean_standerd_deviation.py
-
Exercise 7: appointment_time_shopping-methods_graph.py
-
-
- Challenge File: Create a Message Printer.py
- Description: Prints information on the user and date and time.
- Challenge File: add_1_to_10.py
- Description: Adds 1 to 10 together.
- Challenge File: area_of_circle.py
- Description: Calculates the area of a circle with the radius from the user.
- Challenge File: find_the_area_of_rectangle.py
- Description: Calculates the area of a rectangle.
- Challenge File: five_average.py
- Description: Takes 5 numbers as input and outputs the average.
- Challenge File: grade_converter.py
- Description: Takes a grade as input and outputs the grade as A, B, C, D, or F.
- Challenge File: loop_add_4.py
- Description: Prints this sequence of numbers: 4, 8, 12, 16, 20, 24, 28, 32.
- Challenge File: multi_shape_calculator.py
- Description: Gives the user a choice between rectangles, squares, circles, and triangles and calculates their area.
- Challenge File: pass_or_fail.py
- Description: Takes a grade and prints "pass" if the score is 40 or more.
- Challenge File: positive_negative_checker.py
- Description: Gets a number as input and prints out whether it's positive or negative.
- Challenge File: promotion_viewer.py
- Description: Gives the user a choice to view a promotion from the list.
- Challenge File: reverse_500.py
- Description: Counts from 500 to 0 in reverse.
- Challenge File: square_root.py
- Description: Calculates square root without the math library.
- Challenge File: Create a Message Printer.py
-
- Challenge File: 1_to_100_intervals_of_10.py
- Description: prints from 1 to 100 in intervals of 10
- Challenge File: 400_by_400_window.py
- Description: creates a 400 by 400 window
- Challenge File: 44_by 400_window.py
- Description: creates a 44 by 400 window
- Challenge File: 80_to_60_interval_of_5.py
- Description: prints from 80 to 60 in intervals of 5
- Challenge File: Button_color_change.py
- Description: two buttons that change color when clicked
- Challenge File: custom_sequnce_printer.py
- Description: prints 2,4,6,10,14,16
- Challenge File: double_window.py
- Description: creates two windows
- Challenge File: factorial_calc.py
- Description: calculates factorial
- Challenge File: factorial_function.py
- Description: function that calculates factorial
- Challenge File: string_reveser.py
- Description: three functions one reverses a given string, another finds the maximum of three given numbers and the third finds the maximum and the minimum
- Challenge File: sum_of_powers_of_2.py
- Description: calculates the sum of powers of 2 up to 2^6
- Challenge File: window_maker.py
- Description: makes a window
- Challenge File: 1_to_100_intervals_of_10.py
-
- Challenge File: addition_subttraction.py
- Description: a GUI calculator with addition and subtraction
- Challenge File: list_delete_change_add.py
- Description: creates a list and modifies it by deleting and adding elements
- Challenge File: middle_change.py
- Description: opens a file and changes in the middle file with the readlines() function
- Challenge File: middle_change_2.py
- Description: opens a file and changes in the middle file without the readlines() function
- Challenge File: three_radio.py
- Description: a GUI window with three radio buttons
- Challenge File: window_with_2_frame.py
- Description: a window with two frames and five buttons
- Challenge File: addition_subttraction.py
-
⚠️ no particular challenge was given today⚠️
-
- Challenge File: matrix_Multiplication_Multiplication_division.py
- Description: multiplies, subtracts, and divides two matrixes
- Challenge File: matrix_to_array.py
- Description: creates a matrix and reshapes it
- Challenge File: matrix_Multiplication_Multiplication_division.py
-
Workbook 1: Session 1 - Workbook.pdf
-
Workbook 2: Session 2 - Workbook.pdf
-
Workbook 3: Session 3 - Workbook.pdf
-
Workbook 4: Session 4 - Workbook.pdf
-
Workbook 5: Session 5 - Workbook.pdf
-
Workbook 6: Session 6 - Workbook.pdf
-
Workbook 7: Session 7 - Workbook.pdf
-
Workbook 8: Session 8 - Workbook.pdf
-
Workbook 9: Session 9 - Workbook.pdf
Extra workbooks provided for further practice
-
Workbook 1: Week 1 - Workbook.docx
-
Workbook 2: Week 2 - Workbook.docx
-
Workbook 3: Week 3 - Workbook.docx
- Session 1 : Computer Architecture and Programming basics.pptx
- Session 2: Control Structures-Loops-Switches-Conditions.pptx
- Session 3: Code Reusability-Functions.pptx
- Session 4: GUI in Python.pptx
- Session 5: Database SQLite in Python.pptx
- Session 6: Basics of Data structures.pptx
- Session 7: Files in Python.pptx
- Session 8: Pandas for data analysis.pptx
- Session 9: numpy and matplotlib.pptx
copy and paste the code below into Windows command line
py -m pip install --upgrade pip
py -m pip install qrcode
py -m pip install pandas
py -m pip install matplotlib
py -m pip install numpy
Session | Session Topic | Practical Work | Day taught |
---|---|---|---|
1 | Module Overview, Computer Architecture, Introduction to Programming principles | Problem Solving Strategies, Flowchart, Pseudocode | Day 1 |
2 | Basics of Python, Variables and Data Types, Programming Concepts – Control Structures | Multiple Problem Solving, Loops, Switches, Conditions | Day 1 |
3 | Programming Concepts – Passing Values | Functions and Parameters | Day 2 |
4 | Design a User Interface Using Python | Graphical User Interface design, Interactive Software implementation using Tkinter | Day 2 |
5 | Databases in Python | SQLite Database, Link GUI to SQLite database | Day 4 |
6 | Data Structures | Lists and Tuples | Day 3 |
7 | File & I/O | Reading/Writing to files | Day 3 |
8 | Data Analysis | Python Libraries for Data Science | Day - |
9 | Arrays and Data visualization | NumPy Arrays, Graphs & Charts using Matplotlib | Day 5 |
10 | QR code and Password check in Python | QR code generation and scanning, Password strength check strategies | Day 4 |
11 | Recap, Q&A, Extra Practical | Day - | |
12 | Assignment Workshop | Day 5 |