Count and display the number of vowels, consonants, uppercase, lowercase characters in string

Count and display the number of vowels, consonants, uppercase, lowercase characters in string   # Vowels & Consonants count str = input(“Type the string: “) vowel_count=0 consonants_count=0 vowel = set(“aeiouAEIOU”) for alphabet in str: if alphabet in vowel: vowel_count=vowel_count +1 elif alphabet == chr(32): consonants_count=consonants_count else: consonants_count=consonants_count+1 print(“Number of Vowels in “,str,” is :”,vowel_count) print(“Number … Read more

Determine whether a number is a perfect number an armstrong number or a palindrome Python Program

Determine whether a number is a perfect number an armstrong number or a palindrome Python Program   # Palindrome (12321 is Palindrome) number=int(input(“Enter any number:”)) num=number num1= number rev=0 while num>0: digit=num%10 rev=rev*10+digit num=int(num/10) if number==rev: print(number ,’is a Palindrome’) else: print(number , ‘Not a Palindrome’) # Armstrong number is equal to sum of cubes … Read more

Information Technology 802 Class 12 Sample Paper Term 2

Information Technology 802 Class 12 Sample Paper Term 2 Subject Code: 802 Session: 2021-2022 Term II Time Allowed: 90 min/ Max. Marks: 30 General Instructions: 1. Please read the instructions carefully 2. This Question Paper is divided into 03 sections, viz., Section A, Section B and Section C. 3. Section A is of 05 marks … Read more

Library Management System Python Project for Class 12

Library Management System Python Project for Class 12 # Python Project Library Management System us MySql Connectivity.    import mysql.connector as sqlctr import sys from datetime import datetime mycon = sqlctr.connect(host=’localhost’, user=’root’, password=’admin’) if mycon.is_connected(): print(‘\n’) print(‘Successfully connected to localhost’) else: print(‘Error while connecting to localhost’) cursor = mycon.cursor() #creating database cursor.execute(“create database if not … Read more

Python MySQL Connectivity Notes Class 12

Python MySQL Connectivity Notes Class 12   Interface Python with MySQL database Contents: ♦  Connecting SQL with Python ♦  Creating database connectivity application ♦  Performing insert, delete, update, queries ♦  Display data by using fetchone(), fetchall(),fetchmany(), rowcount()   Database connectivity Database connectivity refers to connection and communication between an application and a database system. The … Read more

Book Store Management Python Project for Class 12

Book Store Management Python Project for Class 12 #Python Project for class 12 Computer Science, using mySQL connectivity.    Note: If you found something wrong or unable to execute the program kindly mention in comment box provided below the article. Source Code: #https://cbsepython.in import mysql.connector mydb=mysql.connector.connect (host=”localhost”, user=”root”, password=”admin”) #CREATING DATABASE AND TABLE mycursor=mydb.cursor() mycursor.execute(“create … Read more

COVID-19 Data Visualization Python Project Class 12

COVID-19 Data Visualization Python Project Class 12   # Python Project for Class 12 Informatics Practices (065), Python MySQL program containing bar graph, line chart, scatter chart Note: If you found something wrong or unable to execute the program kindly mention in comment box provided below the article.     #cbsepython.in import pandas as pd … Read more

Copywrite © 2020-2026, CBSE Python,
All Rights Reserved