Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
1.4 kB
3
Indexable
Never
from google.colab import files
from PIL import Image
import numpy as np

uploaded = files.upload()

for fn in uploaded.keys():
  print('User uploaded file "{name}" with length {length} bytes'.format(
      name=fn, length=len(uploaded[fn])))
  
img = image.open(uploaded).convert('L')
img_np = np.asarray(img)

class Student:
  def __init__ (self, np_array):
    self.number_of_students
    self.name_of_teachers = 'Aditya Dandwate'
    self.data = np_array
    self.stats
    self.summary
  
  def set_num_students (self, array):
    self.number_of_studetns = len(array)

  def statistics_calculator(self, array):
    for i in array:
      sum_of_marks 
      sum_of_marks = sum_of_marks + i
    
    mean = (sum_of_marks)/(len(array))
    median = np.median(array)
    max = max(array)
    min = min(array)
    std_dev = np.std(array)
    self.stats = {
        "mean" : mean
        "median" : median
        "max" : max
        "min" : min
        "standard deviation" : std_dev
    }

  def organiser(self, name_of_teacher, number_of_students, stats):
    self.summary = [name_of_teacher, number_of_students, stats]
    print(self.summary)


  def init (self):
    for i in range(np_array):
      np_array[i] = ((np-array[i] - min(np_array))*100)/(max(np_array) - min(np_array))
    
    self.data = np_array
    set_num_students(np_array)
    statistics_calculator(np_array)