- 1
I cannot figure out how to write this code. According to the idea, this task is written through lists and classes.
Write a function that takes string arguments: first name, last name, student class, as well as a list of ratings. The function should calculate the average score and display it on the screen in in the form "Student of grade N Last name First name has an average grade of M".
2 Réponses
+ 6
Ф. Е. Ю. ,
may be you can show us your attempt first?
=> please put your code in playground and link it here. 
thanks!
0
print("Start programm:")
import time
a = str(input("Введите свое имя: "))
b = str(input("Введите свою фамилию: "))
c = str(input("Введите свое отчество: "))
d = str(input("Введите свой год рождения: "))
e = str(input("Введите свою группу: "))
class Student:
     def _init_(self, a, b, c, d, e):
        time.sleep(3) # Задержка для выяснения когда показывается сам конструктор
        print("Содержимое конструктора:")
        self.abcde = list()
        self.a = a
        self.b = b
        self.c = c
        self.__d = d 
        self._e = e 
        print(a, b, c, e, d) 
     def _del_(self):
        time.sleep(5) 
        print("Содержимое деструктора:")
        print("Удален список класса студент" % self.abcde)
pt = Student(a, b, c, e, d)
pt._e
pt.Student_d
print("Моя группа:", pt.Student_d, "Мой год рождения:", pt._e)
del pt
print("Мои ФИО:", b, a, c, "Мой год рождения:", d, "Моя группа:", e)
print("End programm!")





