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

Vivek Negi PDF

The document discusses a mock test application project in Python. It provides an overview of the project, requirements, modules used including the random and sys modules, and includes source code snippets. The application allows a user to play mock tests on their computer.
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)
50 views9 pages

Vivek Negi PDF

The document discusses a mock test application project in Python. It provides an overview of the project, requirements, modules used including the random and sys modules, and includes source code snippets. The application allows a user to play mock tests on their computer.
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

Panjab University Swami Sarvanand Giri Regional Center

Hoshiarpur, (Punjab)-146021

CONTENT

Chapter 1 Technical Specification


1.1 Python overview
​1.2 Features of Python
Chapter 2 Project- Mock test application

Project Overview
Requirements
Modules Used
Dialog box
Source code

1
Panjab University Swami Sarvanand Giri Regional Center
Hoshiarpur, (Punjab)-146021

PYTHON OVERVIEW

Python​ is an ​interpreted​ ​high-level programming


language​ for ​general-purpose programming​. Created by ​Guido van
Rossum​ and first released in 1991, Python has a design philosophy that
emphasizes ​code readability​, notably using ​significant whitespace​. It
provides constructs that enable clear programming on both small and large
scales. In July 2018, Van Rossum stepped down as the leader in the
language community after 30 years.
Python features a ​dynamic type​ system and automatic ​memory management​.
It supports multiple ​programming paradigms​,
including ​object-oriented​, ​imperative​, ​functional​ and ​procedural​, and has a
large and comprehensive ​standard library

 
Features of the Python Language

Simple 
Python is a simple and minimalistic language. Reading a good Python
program feels almost like reading English, although very strict English!
This pseudo-code nature of Python is one of its greatest strengths. It
allows you to concentrate on the solution to the problem rather than the
language itself.

Easy to Learn 
As you will see, Python is extremely easy to get started with. Python has
an extraordinarily simple syntax, as already mentioned.

Free and Open Source 


Python is an example of a ​FLOSS​ (Free/Libré and Open Source
Software). In simple terms, you can freely distribute copies of this
software, read its source code, make changes to it, and use pieces of it in
2
Panjab University Swami Sarvanand Giri Regional Center
Hoshiarpur, (Punjab)-146021
new free programs. FLOSS is based on the concept of a community
which shares knowledge. This is one of the reasons why Python is so
good - it has been created and is constantly improved by a community
who just want to see a better Python.

High-level Language 
When you write programs in Python, you never need to bother about the
low-level details such as managing the memory used by your program,
etc.

Portable 
Due to its open-source nature, Python has been ported to (i.e. changed to
make it work on) many platforms. All your Python programs can work on
any of these platforms without requiring any changes at all if you are
careful enough to avoid any system-dependent features.
You can use Python on GNU/Linux, Windows, FreeBSD, Macintosh,
Solaris, OS/2, Amiga, AROS, AS/400, BeOS, OS/390, z/OS, Palm OS,
QNX, VMS, Psion, Acorn RISC OS, VxWorks, PlayStation, Sharp
Zaurus, Windows CE and PocketPC!
You can even use a platform like ​Kivy​ to create games for your
computer ​and​ for iPhone, iPad, and Android.

Interpreted 
This requires a bit of explanation.
A program written in a compiled language like C or C++ is converted
from the source language i.e. C or C++ into a language that is spoken by
your computer (binary code i.e. 0s and 1s) using a compiler with various
flags and options. When you run the program, the linker/loader software
copies the program from hard disk to memory and starts running it.
Python, on the other hand, does not need compilation to binary. You
just ​run​ the program directly from the source code. Internally, Python
converts the source code into an intermediate form called bytecodes and
then translates this into the native language of your computer and then
runs it. All this, actually, makes using Python much easier since you don't
3
Panjab University Swami Sarvanand Giri Regional Center
Hoshiarpur, (Punjab)-146021
have to worry about compiling the program, making sure that the proper
libraries are linked and loaded, etc. This also makes your Python
programs much more portable, since you can just copy your Python
program onto another computer and it just works!

Object Oriented 
Python supports procedure-oriented programming as well as
object-oriented programming. In ​procedure-oriented​ languages, the
program is built around procedures or functions which are nothing but
reusable pieces of programs. In ​object-oriented​ languages, the program is
built around objects which combine data and functionality. Python has a
very powerful but simplistic way of doing OOP, especially when
compared to big languages like C++ or Java.

Extensive Libraries 
The Python Standard Library is huge indeed. It can help you do various
things involving regular expressions,documentation generation, unit
testing, threading, databases, web browsers, CGI, FTP, email, XML,
XML-RPC, HTML, WAV files, cryptography, GUI (graphical user
interfaces), and other system-dependent stuff. Remember, all this is
always available wherever Python is installed. This is called the ​Batteries
Included​ philosophy of Python.

4
Panjab University Swami Sarvanand Giri Regional Center
Hoshiarpur, (Punjab)-146021

MOCK TEST APP

Benefits of System

Free to test
Less memory consumed
Easy to install
Not difficult to play.

General Requirements
The following general requirements were laid out for this project:

The player can play this game.


The player can provide some necessary function of playing it using space or
upkey function.
All users data and scores could be stored electronically.

Modules Used

Random
This module implements pseudo-random number generators for various
distributions.
For integers, there is uniform selection from a range. For sequences, there is
uniform selection of a random element, a function to generate a random
permutation of a list in-place, and a function for random sampling without
replacement.

5
Panjab University Swami Sarvanand Giri Regional Center
Hoshiarpur, (Punjab)-146021
On the real line, there are functions to compute uniform, normal (Gaussian),
lognormal, negative exponential, gamma, and beta distributions. For
generating distributions of angles, the von Mises distribution is available.
Almost all module functions depend on the basic function ​random()​, which
generates a random float uniformly in the semi-open range [0.0, 1.0). Python
uses the Mersenne Twister as the core generator. It produces 53-bit precision
floats and has a period of 2**19937-1.

SYSTEM:
Like all the other modules, the sys module has to be imported with the
import statement, i.e.

import sys

If there are questions about the import statement, we recommend the


introductory chapter of our basic course concerning this topic ​Modular
Programming and Modules

The sys module provides information about constants, functions and


methods of the Python interpreter. dir(system) gives a summary of the
available constants, functions and methods. Another possibility is the
help() function. Using help(sys) provides valuable detail information.

6
Panjab University Swami Sarvanand Giri Regional Center
Hoshiarpur, (Punjab)-146021

Dialog box:

SOURCE CODE:

7
Panjab University Swami Sarvanand Giri Regional Center
Hoshiarpur, (Punjab)-146021

8
Panjab University Swami Sarvanand Giri Regional Center
Hoshiarpur, (Punjab)-146021

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy