Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

COMPUTER

SCIENCE PROJECT
CODE WARS
CLASS XI

DONE BY – Aarathi, Sree


Varshini , Shahrukh
SYNOPSIS
This project is developed for user to learn more about python and check their
knowledge level on programs. This project conveys the following project:

 It asks the user to proceed with the program only after signing up and then
logging in.
 If they have already signed up, they can directly log in.
 Then the programs assigned for level 1 will be displayed.
 Each level contains two questions and if the user completes the program
then they can be move on to the next level.
 In total there are 4 levels with a bonus question in the end
 The programs included are:

1. LEVEL 1 – Question 1: Max, Min and Sum


Question 2: square of number using math module

2. LEVEL 2 – Question 1: Palindrome number


Question 2: Check if a number is odd or even

3. LEVEL 3 – Question 1: Armstrong number


Question 2: Fibonacci sequence

4. LEVEL 4 – Question 1: Patterns


Question 2: LCM and GCD

 In the end after the levels are passed a congratulated message is displayed
SYSTEM REQUIRMENTS –

HARDWARE REQUIRMENT:-
1. Modern operating system:

i) Windows 7 or 10

ii) Mac OS X 10.11 or higher, 64.611

iii) Linux: RHEL 6/7, 64 bit

2. Processor:

i) X86 64-bit CPU(Intel/AMD architecture)

3. Memory:

i) 4 GB RAM

ii) 5 GB free disk space

SOFTWARE REQUIREMENTS:-
1. Windows (7/8/10)/Mac/Linux

2. Stable internet connection

3. Anaconda packages for S2/64-bit with python 3.7 or above

4. Microsoft Excel

5. Python IDLE
IMPORTED PACKAGES

A Python module is a file containing Python definitions and statements.


A module can define functions, classes, and variables. A module can also
include runnable code. Grouping related code into a module makes the code
easier to understand and use. It also makes the code logically organized.
1. RANDOM MODULE:
Random module is used to generate random float values. This is done by
using random.random() method that helps generate a random float value
ranging from 0.0 to 1.0. There are no arguments required for the function.
Example:
import random

print('Printing random number using random.random():')


print(random.random())

OUTPUT:

Printing random number using random.random():


0.909824521137017

In Python, the randint() method is used to generate a random number between


the supplied integers. The random module defines this function. The syntax of
this function is:

random.randint(a, b)

import random

print('Random number:', random.randint(0,10))


print('Random number:', random.randint(0,50))
print('Random number:', random.randint(0,100))
Output:

Random number: 5
Random number: 32
Random number: 84

2. DATE TIME MODULE:

In Python, date and time are not a data type of their own, but a module named
datetime can be imported to work with the date as well as time. Python
Datetime module comes built into Python, so there is no need to install it
externally.
Python Datetime module supplies classes to work with date and time. These
classes provide a number of functions to deal with dates, times and time
intervals. Date and datetime are an object in Python, so when you manipulate
them, you are actually manipulating objects and not string or timestamps.

The DateTime module is categorized into 6 main classes:


i. Date – An idealized naive date, assuming the current Gregorian calendar
always was, and always will be, in effect. Its attributes are year, month and
day.
ii. Time – An idealized time, independent of any particular day, assuming that
every day has exactly 24*60*60 seconds. Its attributes are hour, minute,
second, microsecond, and tzinfo
iii. Datetime – It’s a combination of date and time along with the attributes
year, month, day, hour, minute, second, microsecond, and tzinfo.
iv. Timedelta – A duration expressing the difference between two dates, time,
or datetime instances to microsecond resolution.
v. Tzinfo – It provides time zone information objects.
vi. Timezone – A class that implements the tzinfo abstract base class as a fixed
offset from the UTC (New in version 3.2).

3. MATH MODULE:
The math module is a standard module in Python and is always available.
To use mathematical functions under this module, you have to import the
module using import math.
Example:
Square root calculation import math math.sqrt(4)
DATA FLOW DIAGRAM

Start

Display Menu

No Sign in Yes

Login – Enter name Sign up – Enter


name

No
No
Yes
Entries Yes Entries
are valid
are valid

Display LEVEL 1

No Program Yes
executed
successfully

Retry
CONGRATS!

Display Level 2

No Yes

CONGRATS!

Display Level 3

No Yes

CONGRATS!!

BONUS ROUND!
No Program Yes
executed
successfully

It’s okay, the last one is


Game Completed
tough, congrats on
completing the other CONGRATS! You are the
rounds. ultimate programmer

Time taken to
complete the game Time taken to complete
the game

Display time
taken
imeDisplay
taken time
to comp
taken
the game

Stop

Stop
BIBLIOGRAPHY
➢ Google.com
➢ Youtube.com
➢ Sunita arora class 11th ip book
➢ www.wikipedia.com
THANK YOU

Data flow diagram- Aarathi


Synopsis and System requirements – Sree varshini
Modules and bibliography – Shahrukh

You might also like