Write a SQL Query to create a Bank Account.
Class 12th CBSE CS Write a SQL Query to create a Bank Account. Solution: –Â Table :-Â Â -> How to Create database Bank Solution :-Â Create database Bank; Â -> Access database. Solution :-Â use Bank; -> How to Create a Table. Solution Create table Bank(AccNo int primary key not null,Cust_name varchar(100)not null,FD_amount int […]
Create a Database Student and Stream with following queries.
Class 12th CBSE CS Create a Database Student and Stream with following queries. Solution: –Â -> How to create database Student_Stream. Solution :-Â create database Student_steam; Output :-Â -> Access the database Student_steam. Solution :-Â use Student_steam; Output :- -> Create table Student. Â Solution : – create table Student(admno int not null,sname varchar(100)not null,class […]
Write a SQL query to create a table Student.
Class 12th CBSE CS Write a SQL query to create a table Student.. Solution: – Write a SQL query to create a table Student How to create a database Student. Solution : – Create database Student; Output :- – > Select Database use Student ; How to create table Student? Solution :- Create table Student(No […]
Write a program to perform Stack Operation.
Class 12th CBSE CS Write a Program to Perform Stack Operation in Python Solution: –Â Fun & Easy to follow Works on all devices Your own Pace Super Affordable Popular Videos https://www.youtube.com/watch?v=9uOETcuFjbE UX for Teams Learn the basics and a bit beyond to improve your backend dev skills. Chris Matthews Designer https://www.youtube.com/watch?v=9uOETcuFjbE SEO & Instagram […]
Write a program to search a record using its roll number and display the name of student. If record not found then display appropriate message.
Class 12th CBSE CS Write a program to search a record using its roll number and display the name of student. If record not found then display appropriate message. Solution: –Â import pickle roll = input(‘Enter roll number that you want to search in binary file :’) file = open(“student.dat”, “rb”) list = pickle.load(file) file.close( […]
Create a binary file with name and roll number of student and display the data by reading the file.
Class 12th CBSE Create a binary file with name and roll number of student and display the data by reading the file. Solution: –Â import pickle def writedata( ): list =[ ] while True: roll = input(“Enter student Roll No:”) sname = input(“Enter student Name :”) student = {“roll”:roll,”name”:sname} list.append(student) choice= input(“Want to add more […]
Write a program to count the number of times the occurrence of ‘is’ word in a text file.
Class 12th CBSE CS Write a program to count the number of times the occurrence of ‘is’ word in a text file. Solution: –Â fin=open(“D:\python programs\Book.txt”,’r’) str=fin.read( ) L=str.split( ) count=0 for i in L: if i==’is’: count=count+1 print(count) fin.close( ) Fun & Easy to follow Works on all devices Your own Pace Super Affordable […]
Write a program to count number of words in a file.
Class 12th CBSE CS Write a program to count number of words in a file. Solution: –Â fin=open(“D:\python programs\Story.txt”,’r’) str=fin.read( ) L=str.split() count_words=0 for i in L: count_words=count_words+1 print(count_words) Fun & Easy to follow Works on all devices Your own Pace Super Affordable Popular Videos https://www.youtube.com/watch?v=9uOETcuFjbE UX for Teams Learn the basics and a bit […]
Write a program to count the number of vowels present in a text file.
Class 12th CBSE CS Write a program to count the number of vowels present in a text file. Solution: –Â fin=open(“D:\python programs\MyBook.txt”,’r’) str=fin.read( ) count=0 for i in str: if i==’a’ or i==’e’ or i==’i’ or i==’o’ or i==’u’: count=count+1 print(count) Fun & Easy to follow Works on all devices Your own Pace Super Affordable […]
Write a program to display ASCII code of a character and vice versa.
Class 12th CBSE CS Write a program to display ASCII code of a character and vice versa. Solution: –Â var=True while var: choice=int(input(“Press-1 to find the ordinal value of a character nPress-2 to find a character of a valuen”)) if choice==1: ch=input(“Enter a character : “) print(ord(ch)) elif choice==2: val=int(input(“Enter an integer value: “)) print(chr(val)) […]