How to draw Indian Flag Using Turtle Python Program

How to draw Indian Flag Using Turtle Python Program   Source Code: import turtle from turtle import* #for output screen screen = turtle.Screen() # Defining a turtle Instance t = turtle.Turtle() speed(-2) # initially penup() t.penup() t.goto(-400, 250) t.pendown() # Orange Rectangle #white rectangle t.color(“orange”) t.begin_fill() t.forward(800) t.right(90) t.forward(167) t.right(90) t.forward(800) t.end_fill() t.left(90) t.forward(167) # … Read more

Input a welcome message and display it Python Program

Input a welcome message and display it Python Program   welcome_message=input(“Enter welcome message : “) print(“Hello, “,welcome_message)     Output: Enter welcome message : “Welcome to https://cbsepython.in. This is the best place to learn CBSE Computer Science. Here you can find chapterwise notes for class 11-12, Practice Question Papers, Python Projects for Class 11 and … Read more

Input a string and determine whether it is a palindrome or not; convert the case of characters in a string

Input a string and determine whether it is a palindrome or not; convert the case of characters in a string   # Python Program to check whether string is palindrome or not   str=input(“Enter a string:”) w=”” for element in str[::-1]: w = w+element if (str==w): print(str, ‘is a Palindrome string’) else: print(str,’ is NOT … Read more

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

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