Skip to main content

Posts

Showing posts from April, 2025

PYTHON - MYSQL CONNECTIVITY CODE

  #INSERTION OF DATA import mysql.connector mydb = mysql.connector.connect( host="localhost", user="root", passwd="root", database="school" ) print("Successfully Connected") #print(mydb) mycursor=mydb.cursor()   v1=int(input("enter ID:")) v2=input("enter name:") v3=input("enter Gender:") v4=int(input("enter age:")) sql='insert into TEACH values("%d","%s","%s","%s")'%(v1,v2,v3,v4) print(sql) mycursor.execute(sql) mydb.commit() print("record added")

QUESTIONS BASED ON PANDAS SERIES | IP

 QUESTIONS BASED ON PANDAS SERIES GRADE XII 1.Given the following Series1 A   100 B   200 C   300 D   400 E   500 Write the command to create above Series and then double the value in series and store in another series named Series2 2. State whether True or False a. A series object is size mutable. b. A Dataframe object is value mutable 3. Consider a given Series , Series1: 200 700 201 700 202 700 203 700 204 700 Write a program in Python Pandas to create the series and display it. 4.Consider the following Series object, s IP          95 Physics     89 Chemistry   92 Math        95 i. Write the Python syntax which will display only Physics. ii. Write the Python syntax to increase marks of all subjects by 10. 5. Consider a given series : SQTR QTR1   50000 QTR2   65890 QTR3   56780 QTR4   89000 QTR5   77900 Write a p...