Posts

MLP Support Teacher for Grading

  # Step 1: Import libraries import pandas as pd from sklearn . feature_extraction . text import TfidfVectorizer from sklearn . tree import DecisionTreeClassifier from sklearn . model_selection import train_test_split from sklearn import tree import matplotlib . pyplot as plt # Step 2: Create a simple dataset (Question + Subject + Difficulty) data = { 'question' : [ "Explain photosynthesis" , "Define gravity" , "What is chemical bonding" , "Describe kinetic energy" , "Explain mitosis" , "What is quantum mechanics" , "Describe water cycle" , "Explain Ohm's Law" , "What are atoms made of" , "Explain the nervous system" ], 'subject' : [ "Biology" , "Physics" , "Chemistry" , "Physics" , "Biology...

MLP Personalize Training

  # Step 1: Import Required Libraries import pandas as pd import numpy as np from sklearn . cluster import KMeans from sklearn . neighbors import KNeighborsClassifier from sklearn . preprocessing import StandardScaler import matplotlib . pyplot as plt import seaborn as sns # Step 2: Create Sample Data # Each student: video_time, story_time, exercise_time (in minutes) data = { 'video_time' : [ 30 , 5 , 10 , 50 , 40 , 15 , 5 , 45 , 8 , 60 ], 'story_time' : [ 5 , 30 , 25 , 5 , 10 , 35 , 45 , 10 , 40 , 5 ], 'exercise_time' : [ 10 , 15 , 40 , 5 , 10 , 20 , 30 , 5 , 30 , 10 ], 'preferred_material' : [ 'Video' , 'Story' , 'Exercise' , 'Video' , 'Video' , 'Story' , 'Story' , 'Video' , 'Story' , 'Video' ] } df = pd . DataFrame ( data ) # Step 3: Preprocess Data features = [ 'video_time' ,...

MLP AI for Special Education

  # Step 1: Import necessary libraries import pandas as pd import numpy as np from sklearn . model_selection import train_test_split from sklearn . preprocessing import LabelEncoder , StandardScaler from sklearn . svm import SVC from sklearn . tree import DecisionTreeClassifier , plot_tree from sklearn . metrics import classification_report , confusion_matrix import matplotlib . pyplot as plt import seaborn as sns # Step 2: Create a sample dataset # Features: Attention Span, Response Time, Interaction Level, Comprehension Score data = { 'attention_span' : [ 20 , 50 , 15 , 45 , 10 , 55 , 12 , 48 , 25 , 60 ], # in minutes 'response_time' : [ 5 , 3 , 8 , 2 , 10 , 2 , 9 , 3 , 6 , 2 ], # in seconds 'interaction_level' : [ 1 , 3 , 1 , 4 , 1 , 4 , 2 , 5 , 2 , 5 ], # scale of 1-5 'comprehension_score' : [ 60 , 85 , 55 , 90 , 50 , 88 , 58 , 92 , 65 , 95 ], # out of 100 ...

sc

1. 3,4,5,6A represent it in array   code:-  array = [3, 4, 5, "6A"] for element in array:     print(element) 2.  show * in array   code:-   #include <stdio.h> int main() {     int array[] = { 1, 2, 3, 42};     printf("%d\n", array[0]);     printf("%d\n", array[1]);     printf("%d\n", array[2]);     printf("%c\n", array[3]);     return 0; } 3.  Calculate the no. of numerical digits in a string. code:-  s tring = "Madhav 9034, I have 34 Rubbe4." count = 0 for char in string:     if char.isdigit():         count = count + 1 print("Number of numerical digits:", count) or   def count_digits(input_string):     count = sum(1 for char in input_string if char.isdigit())     return count if __name__ == "__main__":     user_input = input("Enter a string: ")     digit_count = count_digits(user_input)   ...