Posts

Showing posts from August, 2023

Indexing and slicing of arrays in python.

Image
Indexing and slicing of arrays. What is Indexing in python? ·                  Indexing in Python  means referring to an element of an iterable by its position within the iterable. ·                   Each character can be accessed using their index number. ·                         To access characters in a string we have two ways: ·         Positive index number ·         Negative index number   Positive indexing example in Python In  Python Positive indexing , we pass a positive index that we want to access in square brackets. The index number starts from  0  which denotes the  first character  of...

Create a XML file with Internal / External DTD and display it using a. CSS b. XSL

                                                               Practical No.6              Create a XML file with Internal / External DTD and display it using a. CSS   b. XSL step 1: Create css file with name (cssemployee.css)     employee       {       background-color: pink;       }       firstname,lastname,email       {       font-size:25px;       display:block;       color: blue;       margin-left: 50px;       }    Step 2:Create xml file with name(data.xml) <?xml version="1.0"?>   <?xml-stylesheet type="text/css...

F.Y.B.Sc Computer Science Python Practical

                                                             Practical no.1 Aim:Write a program to design and develop python program to implement various control statement using suitable examples   program 1: Write a program to check whether the entered number is divisible by 3(use if statement )   i=int(input("Enter any number")) if(i%3==0):             print("%d is divisible by 3" %i)   Output: Enter any number9 9 is divisible by 3   Program 2:Write a program to check whether the entered number is divisible by 3 or not(use if-else statement)   i=int(input("Enter any number: ")) if(i%3==0):             print("%d is divisible by 3" %i) else:             print(...