Skip to main content

Posts

Showing posts from August, 2024

REVISION LINKS - IP

  REVISION LINKS IP / COMPUTER SC  COMPUTER SYSTEM OVERVIEW - https://blog12ip.blogspot.com/2024/04/chapter-1-computer-system-overview.html PYTHON SLICING - https://blog12ip.blogspot.com/2024/08/ip-cs-python-slicing.html PYTHON BASICS PPT -  https://blog12ip.blogspot.com/2024/04/python-basics-grade-xi.html PYTHON BASIC ASSIGNMENT - https://blog12ip.blogspot.com/2024/05/grade-xi-python-basics-assignment.html IF CONTROL STRUCTURE - https://blog12ip.blogspot.com/2024/07/grade-xi-cs-control-structure-if-notes.html NESTED FOR LOOP - https://blog12ip.blogspot.com/2024/07/grade-xi-nested-for-loop.html EMERGING TRENDS - https://blog12ip.blogspot.com/2024/08/ip-emerging-trends-q.html LISTS IN PYTHON CODES - https://blog12ip.blogspot.com/2024/08/list-in-python-6th-aug.html LIST REVISION - https://blog12ip.blogspot.com/2024/08/ip-dataframe-revision.html COMPUTER SCIENCE CHAPTERS BOOLEAN ALGEBRA - https://blog12ip.blogspot.com/2024/04/boolean-algebra-notes-grade-xi.html NESTED FOR LO...

IP - DATAFRAME REVISION - 27 AUG

  DATAFRAME REVISION GRADE XII (a) Write python statements to create a data frame “STAFF” for the following data.             Name   Age  Designation T100 YAMINI 35 PRINCIPAL T101 DINESH 40 SYSTEM MANAGER T102 SHYAM 50 TEACHER T103 VINOD 45 ACCOUNTANT T104 SYRIA 30 RECEPTIONIST (b) Write the python code to rename the column designation to desig in the dataframe created in the previous question. (c) Add one more student‟s record permanently in the dataframe. (d) Add one more column to store the fee details. (e) Write python code to delete column fee of data frame permanently. (f) Write python code to delete the 3rd and 5th rows from dataframe. (g) Write a python code to display the name and designation of employees whose  age more than 40 and less than 50. (h) Change the designation of Shyam to Vice Principal (i) Display the details of teachers having the index as T101, T103. SOL: Ans: (a) import pandas as pd data={'name':['Yamini','...

(CS / IP)REVISION - NESTED FOR LOOP - 23rd AUG

  REVISION - NESTED FOR LOOP 1. Print the following pattern : 1 2  3 4  5  6 7  8  9  10 Solution : n = 1 for i in range(1, 5):     for j in range(1, i + 1):         print(n, end=" ")         n += 1     print() 2.  @  @ @  @ @ @  @ @ @ @  3. Pattern: 1 2 2 3 3 3 4 4 4 4 4.Find the output of the given p attern: for i in range(8):     for j in range(8):         if(i+j)%2==0:             print("#",end=" ")         else:             print(" ",end=" ")     print() 5. Pattern: 1 2 1 3 2 1 4 3 2 1 Sol: for i in range(1, 5):     for j in range(i, 0, -1):         print(j, end="")     print() 6. Find The Output: for i in range(1,4):     for j in range(i):         print(j,"#",end=" ",sep='8') ...

REVISION LIST PRACTICE - 21 AUG

  REVISION LIST PRACTICE  GRADE XI 1.#LINEAR SEARCH/search for an element in a given list list1=eval(input("Enter the List elements")) length=len(list1) element=int(input("Enter the element to be searched for"))  for i in range(0,length):     if element==list1[i]:         print("Element found At Index:",i)         break else:     print(element,"Not present in the list") 2.#[45,66,20,77,20] #REPLACE [ALL 2 WITH 20 IN A LIST] a=[1,2,2,1,4,5,1] for i in range(len(a)):     if a[i]==2:         a[i]=20 print(a) 3. #PROGRAM TO CALCULATE MEAN OF A GIVEN LIST NUMBERS list1=eval(input("Enter the List elements")) length=len(list1) mean=sum=0 for i in range(0,length):     sum+=list1[i] mean=sum/length print("Given List is:",list1) print("Mean of Given List is:",mean) 4.#ADDITION OF ELEMENTS list1=[4,5,6,6] list2=[1,2,3,4] print("ORIGINAL LIST1 IS:"+str(list1)) print("ORIGINAL LIST2 IS:...

CS / IP - LIST OPERATIONS - PROJECT - 16TH AUG 24

  LIST OPERATIONS- PROJECT FOR BEGINNERS # -*- coding: utf-8 -*- """ Created on Fri Aug 16 10:18:23 2024 @author: Kirti Hora """ myList = [] #myList having 5 elements choice = 0 print("\nL I S T O P E R A T I O N S") ans='y' while ans=='y':     print(" 1. Append an element")     print(" 2. Insert an element at the desired position")     print(" 3. Append a list to the given list")     print(" 4. Modify an existing element")     print(" 5. Delete an existing element by its position")     print(" 6. Delete an existing element by its value")            print(" 7. Sort the list in ascending order")     print(" 8. Sort the list in descending order")     print(" 9. Display the list")     choice = int(input("ENTER YOUR CHOICE (1-9): "))     #append element     if choice == 1:         #WAP to append an element in a list   ...

IP / CS - Python Slicing

  Python slicing Python slicing is a technique that allows you to extract specific parts of sequences like lists, strings, or tuples. It works by specifying a start, stop, and an optional step, using the following syntax: sequence[start:stop:step] EG:#1 my_list = [ 0 , 1 , 2 , 3 , 4 , 5 ]  print (my_list[ 1 : 4 ]) # Output: [1, 2, 3] #2 my_string = "Hello, World!"   print (my_string[: 5 ]) # Output: "Hello"   print (my_string[ 7 :]) # Output: "World!" #3 my_list = [ 10 , 20 , 30 , 40 , 50 ]  print (my_list[- 4 :- 1 ]) # Output: [20, 30, 40] #4 my_string = "Python"   print (my_string[::- 1 ]) # Output: "nohtyP" #5 lst = list(range(10)) >>> print(lst) >>> print(lst[2:6:2]) #6 a = list(range(10)) print(a[:-2]) #7 a = list(range(10)) >>> print(a[::4]) #8 a = list(range(10)) >>> print(a[2:-2]) a = list(range(10)) >>> print(a[2:3])  Ans:[2] >>> a = list(range(10)) >>> print(a...

IP -EMERGING TRENDS -Q&A

  CHAPTER :Emerging Trends QUESTION & ANSWERS 1. List some of the cloud-based services that you are using at present. Answer –  Some of the cloud based services are a. Infrastructure as a Service (IaaS) –  The IaaS providers can offer different kinds of computing infrastructure because of its speed of deployment, example Amazon Web Services, Google Compute Engine and Microsoft Azure. b. Platform as a Service (PaaS) –  The facility provided by the cloud, where a user can install and execute an application without worrying about the underlying infrastructure and their setup. example, Database Server, Web Server, Programming language execution environment. c. Software as a Service (SaaS) –  SaaS provides on-demand access to application software, usually requiring a licensing or subscription by the user. example, Google Doc, Microsoft Office 365, Drop Box etc. 2. What do you understand by the Internet of Things? List some of its potential application...

LIST IN PYTHON - 14TH AUG

  LIST IN PYTHON BEGINNERS PRACTICE QUESTIONS 1. Creating List by accepting data from user List1=[] #Empty list n=int(input("Enter number of elements"))    i=0 while i < n:     num= int(input("Enter element " + str(i) + ": "))     List1+=[num]       i+=1 print(List1) OR #Creating List by accepting data from user List1=[ ] n=int(input("Enter number of elements"))   i=0 while i < n:     List1+=[int(input("Enter the element"))]       i+=1     print(List1) 2.Write a program to input the size and the list of elements from user. Count the number of elements  which are divisible by 5 list1= [ ] s =int (input("Enter no of elements")) for i in range(s):     list1 += [int (input("Enter the Elements"))] count=0 for num in list1:         if num % 5 ==0:             count = count+1 print("No. of elements divisible by 5--",c...