0% found this document useful (0 votes)
4 views9 pages

Computer Science IP Report

The document outlines a Computer Science project for the SSCE 2024-25, including various programming exercises using Python. It covers topics such as height conversion, BMI calculation, string manipulation, Mersenne numbers, and character classification. Additionally, it provides source code examples, execution instructions, and a bibliography for further reference.

Uploaded by

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

Computer Science IP Report

The document outlines a Computer Science project for the SSCE 2024-25, including various programming exercises using Python. It covers topics such as height conversion, BMI calculation, string manipulation, Mersenne numbers, and character classification. Additionally, it provides source code examples, execution instructions, and a bibliography for further reference.

Uploaded by

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

M.A.V.

VIDYASHRAM

SSCE 2024-25

COMPUTER SCIENCE PROJECT

PROJECT TITLE:

NAME :
ROLL NO :
GRADE : XI-‘A’
SUBJECT : COMPUTER SCIENCE
TABLE OF CONTENTS:
S.NO TOPICS PG.NO
1. INTRODUCTION 1

2. PROGRAM TO ACCEPT THE 2


HEIGHT IN CM AND CONVERT IT
INTO FEET AND INCHES

3. PROGRAM THAT ACCEPTS 3


WEIGHT IN KG AND HEIGHT IN
METERS AND CALCULATE THE
BMI

4. PROGRAM THAT READS A STRING 4


AND THEN PRINTS A STRING
THAT CAPITALIZES EVERY
OTHER LETTER IN THE STRING
5. PYTHON SCRIPT THAT DISPLAYS 5
THE FIRST SEVEN MERSENNE
NUMBERS AND DISPLAYS ‘PRIME’
NEXT TO MERSENNE PRIME
NUMBERS

6. PROGRAM TO PRINT WHETHER A 6


GIVEN CHARACTER IS AN
UPPERCASE OR A LOWERCASE
CHARACTER OR A DIGIT OR ANY
OTHER CHARACTER

7. BIBLIOGRAPHY 7
INTRODUCTION:
This course is the first of a two-course sequence: Introduction to
Computer Science and Programming Using Python, and Introduction
to Computational Thinking and Data Science. Together, they are
designed to help people with no prior exposure to computer science or
programming learn to think computationally and write programs to
tackle useful problems. Some of the people taking the two courses
will use them as a stepping stone to more advanced computer science
courses, but for many it will be their first and last computer science
courses. This run features lecture videos, lecture exercises, and
problem sets using Python 3.5. Even if you previously took the course
with Python 2.7, you will be able to easily transition to Python 3.5 in
future courses, or enroll now to refresh your learning.
Since these courses may be the only formal computer science courses
many of the students take, we have chosen to focus on breadth rather
than depth. The goal is to provide students with a brief introduction to
many topics so they will have an idea of what is possible when they
need to think about how to use computation to accomplish some goal
later in their career. That said, they are not "computation appreciation"
courses. They are challenging and rigorous courses in which the
students spend a lot of time and effort learning to bend the computer
to their will.

1
PROGRAM TO ACCEPT THE HEIGHT IN
CM AND CONVERT IT INTO FEET AND
INCHES

SOURCE CODE:
a=float(input('Enter your height in centimeters:'))
Feet=a*0.032
Inch=a*0.393
print('Your height in feet is:', Feet)
print('Your height in inch is:', Inch)

EXECUTION
Press F5 or Press Run Run Module

OUTPUT:
Enter your height in centimeters:177
Your height in feet is: 5.664
Your height in inch is: 69.561

2
PROGRAM THAT ACCEPTS WEIGHT IN
KG AND HEIGHT IN METERS AND
CALCULATE THE BMI

SOURCE CODE:
W = float(input('Enter the weight in Kg:'))
H = float(input('Enter height in meters:'))
BMI=W/(H**2)
print('BMI is:', BMI)

EXECUTION
Press F5 or Press Run Run Module

OUTPUT:
Enter the weight in Kg:70
Enter height in meters:1.8
BMI is: 21.604938271604937

3
PROGRAM THAT READS A STRING AND
THEN PRINTS A STRING THAT
CAPITALIZES EVERY OTHER LETTER IN
THE STRING

SOURCE CODE:
string=input('Enter a string: ')
length=len(string)
print('Original string:',string)
string2=''
for a in range(0,length,2):
string2+=string[a]
if a<length-1:
string2+=string[a+1].upper()
print('Alternatively capitalized string:',string2)

EXECUTION
Press F5 or Press Run Run Module

OUTPUT:
Enter a string: football
Original string: football
Alternatively capitalized string: fOoTbAlL

4
PYTHON SCRIPT THAT DISPLAYS THE
FIRST FIVE MERSENNE NUMBERS AND
DISPLAYS ‘PRIME’ NEXT TO MERSENNE
PRIME NUMBERS
SOURCE CODE:
for a in range(1,6):
mersnum=2**a-1
mid=mersnum//2+1
for b in range(2,mid):
if mersnum%b==0:
print(mersnum)
break
else:
print(mersnum,'\tPrime')

EXECUTION
Press F5 or Press Run Run Module

OUTPUT:
1 Prime
3 Prime
7 Prime
15
31 Prime

5
PROGRAM TO PRINT WHETHER A GIVEN
CHARACTER IS AN UPPERCASE OR A
LOWERCASE CHARACTER OR A DIGIT
OR ANY OTHER CHARACTER

SORCE CODE:
ch=input('Enter a single character: ')
if ch>='A'and ch<='Z':
print('You have entered an uppercase character.')
elif ch>='a'and ch<='z':
print('You have entered an lowercase character.')
elif ch>='0'and ch<='9':
print('You have entered a digit.')
else:
print('You have entered a special character.')

EXECUTION
Press F5 or Press Run Run Module

OUTPUT:
Enter a single character: I
You have entered an uppercase character.

6
BIBLIOGRAPHY

1. COMPUTER SCIENCE NCERT (CLASS XI)

2. www.learnpython4cbse.com

3. www.geeksforgeeks.org

4. www.programiz.com

You might also like