, it must be 0, correct. So, I will just repeat the definition of the mean. Remember that the mean in terms of probability is x i into p i, the sum of x i into p i. So, this is the mean of a random variable. In this case, the random variable, what is the random variable? If you have this event, what is the random variable? Number of heads, correct, correct, number of heads. So, x i is the number of heads, i is the number of heads. So, the random variable is number of heads, and the probability is this->author; } std::string getPublisher() { return this->publisher; } int getYear() { return this->year; } std::string getGenre() { return this->genre; } std::string getISBN() { return this->isbn; } int getPages() { return this->pages; } void setTitle(std::string title) { this->title = title; } void setAuthor(std::string author) { this->author': 'Author 2', 'genre': 'Non-Fiction', 'publication_year': 2018} ] formatted_books = format_books(books) for book in formatted_books: print(book)

