worksheet function – Excel formula/solution for grading multiple choice questions with multiple answers

I have an Excel sheet where I input student test answers like so:

  1. A
  2. B
  3. A,B
  4. C,D

and compare these answers to the correct answers:

  1. A
  2. A
  3. B
  4. C,D,E

I know how to use an IF function to output ‘CORRECT’ in a cell if the student answer is correct (e.g. answer 1) and otherwise spit out ‘INCORRECT’.

What I can’t seem to do is find a formula which will spit out ‘CORRECT’ if correct (1); ‘INCORRECT’ if wrong (2); ‘MISTAKE’ if the student got one of the answers correct, but at the same time answered another choice incorrectly (3); and ‘MISSED’ if the student answered correctly but missed an answer (4).

Is there any way to do this? I’ve tried using wildcards and countifs but it’s beyond my Excel level.

Thanks in advance for any help!

c++17 – University Grading System (OOP)

I’ve been furthering my development and understanding in OOP (Object Oriented Programming) and would appreciate feedback on this new console program I’ve created. The main aspects I would like to know is have I made good use of OOP, can I improve upon techniques demonstrated in this program? Have I done anything bad? I do understand I should be loading data from a text-file, but that’s not the point of this program. For quick run of the program I’ve put sample data which is generated in the “University” constructor. I also understand that’s probably not the best name to call my class. I based this program off the following scenario. Many thanks to anyone who gives me any feedback!
enter image description here

// Progress of Students Calculator.cpp : This file contains the 'main' function. Program execution begins and ends there.
#include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>
#include <map>
class User 
{
    static int currentID;
    int m_ID;
    std::string m_Name;
public:
    User(std::string name) : m_Name{ name }, m_ID {currentID++}{
}
    int ID() const { return m_ID; }
    std::string name() const { return m_Name; }
};
int User::currentID = 1;
class Subject {
    static int currentID;
    int m_ID;
    std::string m_Name;
public:
    Subject(std::string name) :m_ID{ currentID++ }, m_Name{ name }{}
    int ID()const { return m_ID; }
    std::string name()const { return m_Name; }
};
int Subject::currentID = 1;
class Department {
    static int currentID;
    int m_ID;
    std::string m_Name;
public:
    Department( std::string name) :m_ID{ currentID++ }, m_Name{ name }{}
    int ID()const { return m_ID; }
    std::string name()const { return m_Name; }
};
int Department::currentID = 1;

class Lecturer : public User {
    int m_SubjectID;
    int m_DepartmentID;
public:
    Lecturer(std::string name, int subjectID, int departmentID) 
        :User(name), m_SubjectID(subjectID), m_DepartmentID(departmentID) {}
    int subjectID()const { return m_SubjectID; }
    int departmentID()const { return m_DepartmentID; }
};

class Student : public User {
    int m_ClassID;
    int m_Result;
public:
    Student(std::string name, int classID, int result)
        :User(name), m_ClassID(classID), m_Result(result) {}
    int classID() const { return m_ClassID; }
    int result() const { return m_Result; }
   
};

class Class 
{
    static int currentID;
    int m_ID;
    int m_LecturerID;
    int m_Size;
    int m_TotalScore;

public:
    Class(int lecturerID) 
        :m_ID{ currentID++ }, m_LecturerID{ lecturerID }, m_Size{ 0 }, m_TotalScore{0}
    {
    }
    int ID()const { return m_ID; }
    int lecturer_ID() const { return m_LecturerID; }
    int size() const { return m_Size; }
    void increment_size() { m_Size++; }
    int total_score() const { return m_TotalScore; }
    void total_score(int result) { m_TotalScore += result; }
};
int Class::currentID = 1;

    class University {
    private:
        std::vector<Department>objDepartments;
        std::vector<Subject>objSubjects;
        std::vector<Lecturer>objLecturers;
        std::vector<Student>objStudents;
        std::vector<Class>objClasses;

        auto find_lecturer_by_id(int ID) {

            return std::find_if(objLecturers.begin(), objLecturers.end(), (&)(Lecturer lecturer) {return lecturer.ID() == ID; });
        }
        auto find_subject_by_id(int ID) {

            return std::find_if(objSubjects.begin(), objSubjects.end(), (&)(Subject subject) {return subject.ID() == ID; });
        }
        auto find_department_by_id(int ID) {
            return std::find_if(objDepartments.begin(), objDepartments.end(), (&)(Department department) {return department.ID() == ID; });
        }
        auto find_class_by_id(int ID) {
            return std::find_if(objClasses.begin(), objClasses.end(), (&)(Class objClass) {return objClass.ID() == ID; });
        }
    public:
        University() {
            objSubjects.emplace_back(Subject{"Programming" });
            objSubjects.emplace_back(Subject{"Web App Development" });
            objSubjects.emplace_back(Subject{"Networking" });
            objDepartments.emplace_back(Department{"Winter Gardens" });
            objDepartments.emplace_back(Department{"South West Skills Campus" });
            objLecturers.emplace_back(Lecturer{"Sean Shearing", 1, 1 });
            objClasses.emplace_back(Class{ 1 });
            objClasses.emplace_back(Class{ 1 });

            //Test data
            add_student("Jack Cole", 1, 56);
            add_student("Sam Cole", 1, 78);
            add_student("Devon Phillips", 1, 91);
            add_student("Thomas Saunders", 1, 54);
            add_student("Jack Kimmins", 2, 58);
            add_student("Oli Stahmer", 2, 91);
            add_student("George Bradley", 2, 78);   
            add_student("Joshua Price", 2, 54);                
        }

        auto best_performing_class() {
            return std::max_element(objClasses.begin(), objClasses.end(), (&)(const Class& lhs, const Class& rhs)
                {
                    return lhs.total_score() < rhs.total_score();
                });
        }
        auto worst_performing_class() {
            return std::min_element(objClasses.begin(), objClasses.end(), (&)(const Class& lhs, const Class& rhs)
                {
                    return lhs.total_score() < rhs.total_score();
                });
        }
        double average(std::vector<Student>& students) {
            
            auto sum = std::transform_reduce(students.begin(), students.end(), 0.0, std::plus<>(),
                ()(auto& student) { return student.result(); });
            return sum / objStudents.size();
        }
        auto find_students_in_class(int classID) {
            std::vector<Student>students;
            for (const Student& objStudent : objStudents) {

                if (objStudent.classID() == classID) {
                    students.push_back({ objStudent });
                }
            }
            return students;
        }

        int class_median_score(int class_id) {
            std::vector<int>scores;
            auto students = find_students_in_class(class_id);
            for (Student& student : students) {
                scores.push_back(student.result());
            }
            std::sort(scores.begin(), scores.end()); 
            if (scores.size() % 2 == 0) 
            {
                return (scores.at(scores.size() / 2  - 1) + scores.at(scores.size()/2)) / 2;                        
            }
            return scores.at(scores.size()/2);
        }
        void view_class_students(int classID) {
            auto students = find_students_in_class(classID);
            display_students(students);
            
        }
        void display_students(std::vector<Student>& objStudents) {
            for (const Student& objStudent : objStudents) {
                std::cout << "ID: " << objStudent.ID() << " | ";
                std::cout << "Name: " << objStudent.name() << " | ";
                std::cout << "Score: " << objStudent.result() << "n";
            }
        }
        auto highest_mark_by_student(std::vector<Student>& objStudents) {
            return std::max_element(objStudents.begin(), objStudents.end(), (&)(const Student& lhs, const Student& rhs)
                {
                    return lhs.result() < rhs.result();
                });
        }
        auto lowest_mark_by_student(std::vector<Student>& objStudents) {
            return std::min_element(objStudents.begin(), objStudents.end(), (&)(const Student& lhs, const Student& rhs)
                {
                    return lhs.result() < rhs.result();
                });
        }
       
        void class_report(int class_id) 
        {
            auto students = find_students_in_class(class_id);
            auto highestScorer = highest_mark_by_student(students);
            auto lowestScorer = lowest_mark_by_student(students);
            std::cout << "Highest scorer: Student ID: " << highestScorer->ID() << " | Name: " << highestScorer->name() << " | score: " << highestScorer->result() <<"n";         
            std::cout << "Lowest scorer: Student ID: " << lowestScorer->ID() << " | Name: " << lowestScorer->name() << " | score: " << lowestScorer->result() << "n";
            std::cout << "Median score: " << class_median_score(class_id) << "n";
            std::cout << "Average score: " << average(students) << "n";
        }

        void overall_classes_report() {
            auto bestClass = best_performing_class();
            auto worstClass = worst_performing_class();
            std::cout << "nBest Performing Class(s)...n";
            std::cout << "ID: " << bestClass->ID() << " | Lecturer: " << find_lecturer_by_id(bestClass->lecturer_ID())->name() << " | score: " << bestClass->total_score() << "n";
            std::cout << "n";
            std::cout << "Worst Performing Class(s)...n";
            std::cout << "ID: " << worstClass->ID() << " | Lecturer: " << find_lecturer_by_id(worstClass->lecturer_ID())->name() << " | score: "<< worstClass->total_score() << "n";
            std::cout << "n";
        }
       
        void display_classes() {
            for (const Class& objClass : objClasses)
            {
                auto lecturer = find_lecturer_by_id(objClass.lecturer_ID());
                auto subject = find_subject_by_id(objClass.lecturer_ID());
                auto department = find_department_by_id(lecturer->departmentID());
                auto students = find_students_in_class(objClass.ID());
               
                std::cout << "Class ID: " << objClass.ID() << "n";
                std::cout << "Class Size: " << objClass.size() << "n";
                std::cout << "Lecturer: " << lecturer->name() << "n";
                std::cout << "Subject: " << subject->name() << "n";
                std::cout << "Department: " << department->name() << "nn";     
            }
        }
  
        bool is_class_id_valid(int class_id) {
            if (auto it = std::find_if(objClasses.begin(), objClasses.end(), (&)(auto &objClass) {
                return class_id == objClass.ID();
                }) == objClasses.end()) {
                return false;
            }
            return true;
        }

        bool add_student(std::string name, int classID, int result) {

            if (is_class_id_valid(classID)) {
                objStudents.emplace_back(Student{ name, classID, result });
                find_class_by_id(classID)->total_score(result);
                find_class_by_id(classID)->increment_size();
                return true;
            }
            return false;
        }
    };

int main()
{
    University objUniversity;

    //viewing class 1
    std::cout << "View class students...n";
    objUniversity.view_class_students(1);

    std::cout << "Class report...n";
    objUniversity.class_report(1);

    //viewing class 2
    std::cout << "View class students...n";
    objUniversity.view_class_students(2);

    std::cout << "Class report...n";
    objUniversity.class_report(2);

    std::cout << "Overall classes report...n";
    objUniversity.overall_classes_report();
    
    //Run via menu system
    //menu_options(objUniversity);
}

post processing – Rec-709 lut, color correction and grading ordering

I recently downloaded some LUTs, and some of them are Rec-709 luts.
From what i’ve read, Rec-709 is some kind of standard that can make images look good on most if not all monitors. I now it is a color-space, but what order is this LUT applied? First or last in the process?
I also wonder if this is a LUT that is not used for color grading, so I have to use another LUT for this?

From what I understand this is the right workflow (roughtly)?

  1. Apply Rec-709 lut
  2. Do color correction (with waveform, vectorscope etc).
  3. Do grading: apply second/last LUT for final touch.

In what order is the best way to do things like this?
Im not 100% sure if stage 1 and 2 should be flipped, or if this is the right order to do things in?

Reason Im asking is that I have some film-footage I’d like to improve using color correction and grading and learning about these kinds of things. Another question i have is can any footage use Rec-709 luts?

Any other suggestions for workflow using two or one LUT are appreciated.

javascript – HackerRank Grading Students JS

Here is my solution to Grading Students courtesy of HackerRank. It passes all the cases. Since I did not found a solution using map I wonder if there is a better implementation.

const nextMultipleOfFive = (number) => {
    return number + (5 - number % 5)
}

const gradingStudents = (g) => {
    return g.map((grade) => {
        let nextMultiple = nextMultipleOfFive(grade)
        if(grade > 37 && grade % 5){
            return (nextMultiple - grade >= 3) 
                ? grade 
                : grade + ( 5 - grade % 5)  
        }
        else{
            return grade
        }
    })
}

photo editing – Underwater: Pure picture with color grading or separated layers?

As I really enjoy underwater photography, I am wondering how does one end up with a final image like the one I share bellow:

Original:

Original Image

After Edition:

After Edits

Source: https://www.instagram.com/p/CApGLcCHStN/

As Lightroom doesn’t have a Channel Mixer (which would be really helpful), I am wondering that the photographer is probably using Photoshop or GIMP. Here the photographer can copy a blue/green channel and convert it to red.

Then it can proceed to the Editings in Lightroom (which is already good for editing pictures at the surface, as one doesn’t looses the colors as underwater).

I know that Tint can also be used for photos less than 10m deep, but it is not the best alternative.

However, in this case, it seems that the photographer is using two separate layers and adds the people separately, so that he can get a darker background.

How does one end up with an image like the one shown above after effects?

Is this only pure picture and color grading?

education – Automated grading with mathematica

Thanks for contributing an answer to Mathematica Stack Exchange!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

Use MathJax to format equations. MathJax reference.

To learn more, see our tips on writing great answers.

Need Premiere PRO / Davinci Resolve Color Grading Expert

Looking for someone who is good at it color correction to create one LUT to me.

I'll give you a bunch of pictures (before and after the LUT) and you'll need to create a LUT based on that. The pictures contain the entire color spectrum, so you can work with good examples.

Your LUT should produce the same result as the following photos.

Pay $ 10 for a single LUT for Premiere PRO or Davince Resolve.

PM, if you can.
SEMrush