Skip to main content

Posts

PANDAS SERIES - 16 /3/26

  PRACTICE QUESTIONS Pandas Series – Practice Questions 1. Write a program to create a Pandas Series containing English alphabets from ‘a’ to ‘z’ and display it. 2. Write a statement to display the alphabets ‘e’ to ‘p’ from the Series EngAlph. 3. Write a statement to display the first 10 values from the Series EngAlph. 4. Write a program to create a Series named 'vow' containing vowels (‘a’, ‘e’, ‘i’, ‘o’, ‘u’) with initial value 0 and display it. 5. Write a statement to set all the values of the Series 'vow' to 10 and display the updated Series. 6. Write a statement to divide all values of the Series 'vow' by 2. 7. Create another Series 'vow1' having 5 elements with index labels ‘a’, ‘e’, ‘i’, ‘o’, ‘u’ and values [2,5,6,3,8] respectively. 8. Write a program to add two Series 'vow' and 'vow1' and store the result in a new Series 'vow3'. 9. Write statements to perform subtraction, multiplication and division betwe...
Recent posts

STACK ASSIGNMENT | 24TH OCT

  STACK ASSIGNMENT QUE 1: [1] A ____________ is a way to store, organize, or manage data in efficient and productive manner. [2] A stack is one of the following types of data structure? a) Linear  b) Dynamic c) Circular d) All of these [3] Stack data structure is following ____________ principle. [4] In stack data can be inserted or deleted from ____________ only. [5] The insert operation in the stack is known as pop. (True/False) [6] You can replace any element position in the stack. (True/False) [7] The peek operation refers to accessing/inspecting the top element in the stack. (True/False) [8] A condition raise due to the stack is full is known as ___________. a) Underflow  b) Overflow  c) List is full d) Completely Filled [9] While popping the element from the stack, a condition will be raised, this condition is known as ____________. a) Underflow b) Overflow c) List is Empty d) Blank List [10] Stack overflow condition is raised i...

Grade XII - CS - Menu-Driven Stack Code | 14-10-25

  PYTHON STACKS LINK :  PYTHON STACKS - NOTES Menu-Driven Stack Program # -*- coding: utf-8 -*- """ Created on Sun Oct 12 17:19:01 2025 @author: Kirti Hora """ ''' Menu-Driven Stack Program 1.PUSH 2.POP 3.DISPLAY 4. DISPLAY EVEN ''' def push(stack):     elements = input("Enter elements to push (separated by spaces): ").split()     for item in elements:         n = int(item)         stack.append(n)         print("Element pushed:", n)     print("Current Stack:", stack) def pop(stack):     if len(stack) == 0:         print("Stack Underflow! Stack is empty.")     else:         n = stack.pop()         print("Deleted Element:", n) def disp(stack):     if len(stack) == 0:         print("Stack Underflow! Stack is empty.")     else:         print("Stack elemen...

CSV SAMPLE PROJECT | MENU DRIVEN | 14 AUG

  # -*- coding: utf-8 -*- """ Created on Thu Aug 14 13:21:08 2025 @author: Kirti Hora """ import csv def createcsv():     filename = "emp.csv"     with open(filename, "w", newline="") as csv_fobj:         wtr_obj = csv.writer(csv_fobj)         wtr_obj.writerow(["Empno", "Name", "Basic Salary", "Allowance", "Deduction", "Net Salary"])         while True:             eno = input("Enter employee no: ")             name = input("Enter name: ")             bs = float(input("Enter basic salary: "))             allowance = 2000             dedn = bs * 0.05             net = bs + allowance - dedn             wtr_obj.writerow([eno, name, bs, allowance, dedn, net])             ...

GRADE XII - CSV FILE

CSV FILE (COMMA SEPERATED VALUE) CSV NOTES LINK :  CSV NOTES - CLICK HERE Writing data to a CSV file involves the following steps: Import the csv module Open the CSV file in write mode ( "w" ) using open() Create the writer object Write the data into the file using the writer object Close the file using close() writerow() Method This method is used to write a single row to a CSV file. It takes a sequence (list or tuple) as its parameter, and writes the items as a comma-separated line in the file. You do not need to add a newline character (\n) — it automatically places the end-of-line marker.     EXAMPLE 1: import csv  # Importing the csv module # CSV file opened using relative path csv_fobj = open("emp.csv", "w")   # Writer object created wtr_obj = csv.writer(csv_fobj) # Record with field heading is written wtr_obj.writerow(["Empno", "Name", "Salary"]) # Records with data are...