My advanced coding

Now I am switched to the advanced programming where I will be learning OOPs (Object-oriented-Programming) and PP (procedural-programming).

I have already learned define function named as def (variable) :

This can help a coder to optimize the code instead of writing big lines of code.

Here is a sample of code I made of VS code

The code is below

# Giving averages to the students

def grade_students(students_numbers):

    average = {}

    for keys, values in students_numbers.items():

        average[keys] = sum(values)/len(values)

    print(average)

students = {“Ali”:[65,98,70],”Babur”:[33,50,99]}

grade_students(students)

Abdur Rehman Siddiqui
https://www.bublooscientist.com.pk

My name is Abdur Rehman Siddiqui. I am of class 8 A and I am writing ✍️ SCIENCE Blogs, Travel Blogs, Computer 🖥 Blogs and much more so read those blogs and get yourself diving into deep interest

Leave a Reply