0% found this document useful (0 votes)
19 views17 pages

CS Project

Uploaded by

Mimk Legend
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views17 pages

CS Project

Uploaded by

Mimk Legend
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 17

Declaration

I, Mimik Kumar Palodra, a student of


class-XI, section-A of Pinnacle Public
School, Ahmadabad,Gujarat hereby
submit the project entitled "A
COMPUTER SCIENCE PROJECT
(USING PYTHON PROGRAMMING
LANGUAGE)" for Computer Practical
of session 2024-2025. This project
report consists of original work done
by me under the able guidance of my
computer teacher, Mr.Vijay Sir.

Date
Student Sign
___________
____________
Content

S. No Topic Teacher's Sign


1 Program 1
2 Program 2
3 Program 3
4 Program 4
5 Program 5
6 Program 6
7 Program 7
8 Program 8
9 Program 9
10 Program 10
11 Program 11
12 Program 12
13 Program 13
14 Program 14
15 Program 15
16 Program 16
17 Program 17
18 Program 18
19 Program 19
S. No Topic Teacher's Sign
20 Program 20

Program 1: Calculate Simple Interest

Topic: Input and Output Statements


Explanation:
This program calculates simple interest based
on user input for principal, rate of interest, and
time. It demonstrates how to use input() for
accepting data and print() for output.
Code
Input:

Output:
Program 2: Find the Largest
of Three Numbers
Topic: Decision Making (if-else statements)
Explanation:
This program determines the largest of three numbers
using conditional statements. It demonstrates the use of
if-elif-else.

Input:
Output:
Program 3: Check if a Number is
Prime
Topic: Loops and Conditional Statements
Explanation:
This program checks whether a given number is prime or
not by dividing it by all numbers less than itself. It
introduces the for loop and else in loop constructs.

Code:
Input:

Output:

Program 4: Fibonacci Sequence


Topic: Loops
Explanation:
This program generates the Fibonacci sequence up to a given
number of terms. It uses a for loop to compute the sequence.

Code:

Input:
Output:

Program 5: Calculate Factorial of a


Number

Topic: Iterative Computation


Explanation:
This program calculates the factorial of a number using a for
loop. Factorial is a basic concept in mathematics and
programming.

Code:

Input:

Output:
Program 6: Sum of Digits of a
Number

Topic: Loops and Arithmetic Operations


Explanation:
This program calculates the sum of digits of a given number by
extracting each digit using the modulo and integer division
operators. It demonstrates the use of loops and arithmetic
operators.

Code:

Input:

Output:

Program 7: Reverse a String


Topic: Strings and Indexing
Explanation:
This program takes a string input from the user and prints its
reverse using slicing. It demonstrates string manipulation
techniques.
Code:

Input:

Output:

Program 8: Check Palindrome


Number

Topic: Loops and Conditional Statements


Explanation:
This program checks whether a given number is a palindrome
(reads the same forward and backward). It demonstrates loops
and conditional logic.

Code:

Input:

Output:
Program 9: Find the GCD of Two
Numbers

Topic: Loops and Logical Operations


Explanation:
This program finds the greatest common divisor (GCD) of two
numbers using the Euclidean algorithm. It demonstrates loops
and modular arithmetic.

Code:

Input:

Output:

Program 10: Convert Decimal to


Binary

Topic: Loops and Number Systems


Explanation:
This program converts a decimal number into its binary
representation using successive division by 2. It demonstrates
loops and number system concepts.

Code:
Input:

Output:

Program 11: Check Armstrong


Number

Topic: Loops and Conditional Statements


Explanation:
An Armstrong number is a number that equals the sum of its
digits raised to the power of the number of digits. This program
checks if a number is an Armstrong number.

Code:

Input:

Output:
Program 12: Generate a
Multiplication Table

Topic: Loops
Explanation:
This program generates the multiplication table for any number
entered by the user. It demonstrates the use of for loops.

Code:

Input:

Output:

Program 13: Calculate the Sum of a


Series (1 + 2 + 3 + ... + n)

Topic: Loops and Mathematical Operations


Explanation:
This program calculates the sum of the first n natural numbers
using a loop. It demonstrates iterative computation.

Code:

Input:

Output:

Program 14: Find the Sum of Even


and Odd Numbers in a List

Topic: Lists and Conditional Statements


Explanation:
This program calculates the sum of even and odd numbers in a
list provided by the user. It demonstrates the use of loops, list
traversal, and conditional checks.

Code:

Input:

Output:
Program 15: Count Vowels in a
String

Topic: Strings and Loops


Explanation:
This program counts the number of vowels in a given string,
demonstrating string traversal and conditional checks.

Code:
Input:

Output:
Program 16: Calculate Area of a
Circle

Topic: Mathematical Operations


Explanation:
This program calculates the area of a circle based on the radius
provided by the user. It demonstrates basic input/output and
arithmetic operations.

Code:

Input:

Output:

Program 17: Swap Two Numbers


Without a Temporary Variable
Topic: Arithmetic Operations
Explanation:
This program swaps the values of two variables without using a
temporary variable. It demonstrates the concept of arithmetic
swapping.

Code:

Input:

Output:

Program 18: Count the Number of


Words in a String

Topic: Strings
Explanation:
This program counts the number of words in a string inputted by
the user. It demonstrates string splitting and counting.

Code:

Input:

Output:
Program 19: Check if a Number is
Even or Odd

Topic: Conditional Statements


Explanation:
This program checks whether a number is even or odd. It
demonstrates the use of the modulus operator and if-else
statements.

Code:

Input:

Output:
Program 20: Calculate the Power of
a Number

Topic: Mathematical Operations


Explanation:
This program calculates the result of raising one number to the
power of another. It demonstrates the use of the ** operator.

Code:

Input:

Output:

You might also like