Python Internship Report
Python Internship Report
Case Study
Conclusion
References
About The Company
YBI Foundation is a Delhi-based not-for-profit edutech company that aims to enable the
youth to grow in the world of emerging technologies. They offer a mix of online and offline
approaches to bring new skills, education, technologies for students, academicians and
practitioners. They believe in the learning anywhere and anytime approach to reach out to
learners. The platform provides free online instructor-led classes for students to excel in data
science, business analytics, machine learning, cloud computing and big data. They aim to
focus on innovation, creativity, technology approach and keep themselves in sync with the
present industry requirements. They endeavour to support learners to achieve the highest
possible goals in their academics and professions.
Python
Scripting Language
A scripting or script language is a programming language that supports scripts, programs
written for a special run-time environment that automate the execution of tasks that could
alternatively be executed one-by-one by a human operator.
Scripting languages are often interpreted (rather than compiled). Primitives are usually the
elementary tasks or API calls, and the language allows them to be combined into more
complex programs. Environments that can be automated through scripting include software
applications, web pages within a web browser, the shells of operating systems (OS),
embedded systems, as well as numerous games.
In OOP programming, computer programs are designed by making them out of objects that
interact with one another. There is significant diversity in object-oriented programming, but
most popular languages are class-based, meaning that objects are instances of classes,
which typically also determines their type.
History
Python was conceived in the late 1980s, and its implementation was started in December
1989 by Guido van Rossum at CWI in the Netherlands as a successor to the ABC language
(itself inspired by SETL) capable of exception handling and interfacing with the Amoeba
operating system. Van Rossum is Python's principal author, and his continuing central role in
deciding the direction of Python is reflected in the title given to him by the Python
community, benevolent dictator for life (BDFL).
Behind The Scene of Python
Downloading python
Python has many native data types. Here are the important ones:
Booleans are either True or False.
Numbers can be integers (1 and 2), floats (1.1 and 1.2), fractions (1/2 and 2/3), or even
complex numbers.
Strings are sequences of Unicode characters, e.g. an HTML document.
Bytes and byte arrays, e.g. a JPEG image file.
Lists are ordered sequences of values.
Tuples are ordered, immutable sequences of values.
Sets are unordered bags of values.
Variable
Variables are nothing but reserved memory locations to store values. This means that when
you create a variable you reserve some space in memory.
Based on the data type of a variable, the interpreter allocates memory and decides what
can be stored in the reserved memory. Therefore, by assigning different data types to
variables, you can store integers, decimals or characters in these variables.
String
In programming terms, we usually call text a string. When you think of a string as a
collection of letters, the term makes sense.
All the letters, numbers, and symbols in this book could be a string.
Python Operators
Python supports several types of operators for performing operations on variables and values.
• Arithmetic Operators:
o + (Addition): Adds two operands.
o - (Subtraction): Subtracts the second operand from the first.
o * (Multiplication): Multiplies two operands.
o / (Division): Divides the first operand by the second. Returns a float.
o // (Floor division): Divides and returns the integer part of the result (truncates
the decimal).
o % (Modulus): Returns the remainder of the division.
o **(Exponentiation): Raises the first operand to the power of the second.
Comparison Operators
Comparison operators compare two values and return a Boolean (True or False) result. These
are useful in decision-making and loops.
Tuple
A tuple is a sequence of immutable Python objects. Tuples are sequences, just like lists. The
differences between tuples and lists are, the tuples cannot be changed unlike lists and tuples
use parentheses.
List
The list is a most versatile datatype available in Python which can be written as a list of
comma- separated values (items) between square brackets. Important thing about a list is
that items in a list need not be of the same type.
Similar to string indices, list indices start at 0, and lists can be sliced, concatenated and so on.
Loop definition
Programming languages provide various control structures that allow for more complicated
execution paths.
Conditional Statements
Decision making is anticipation of conditions occurring while execution of the program and
specifying actions taken according to the conditions.
Function
Function blocks begin with the keyword def followed by the function name and parentheses (
( ) ).
Any input parameters or arguments should be placed within these parentheses. You can
also define parameters inside these parentheses.
The first statement of a function can be an optional statement - the documentation string of
the function.
The code block within every function starts with a colon (:) and is indented.
The statement return [expression] exits a function, optionally passing back an expression to
the caller. A return statement with no arguments is the same as return None.
Syntax:
Def functionname(parameters):
“function_docstring”
Function_suite
Return[expression]
Scope of Python
1 - Science
- Bioinformatics
2 - System Administration
- Unix
- Web logic
- Web sphere
3 - Web Application Development
Problem Statement:
Create a Python-based COVID-19 symptom detector that asks the user about their health
symptoms and suggests whether they should consider getting tested for COVID-19. The
system should ask questions based on common COVID-19 symptoms such as fever, cough,
difficulty breathing, etc., and provide a recommendation based on the user's inputs.
Requirements:
1. Symptom Check: Ask the user whether they are experiencing common COVID-19
symptoms (e.g., fever, cough, loss of taste/smell, etc.).
2. Risk Assessment: Based on the symptoms, assess whether the user is at low,
moderate, or high risk of having COVID-19.
3. Suggestion: Provide a recommendation to the user about whether they should get
tested or monitor their health.
4. Basic Validation: Ensure that the user inputs valid responses (yes/no).
Explanation:
1. Input: The program asks the user a series of questions related to common COVID-19
symptoms like fever, cough, loss of taste/smell, sore throat, and difficulty breathing.
2. Risk Assessment: Based on the number of symptoms the user reports having, the
program evaluates the risk:
o Low Risk: No symptoms reported.
o Moderate Risk: 1-2 symptoms reported.
o High Risk: 3 or more symptoms reported.
3. Recommendation: Based on the assessment, the program suggests whether the user
should monitor their health, consult a doctor, or get tested for COVID-19.
Assessment Result: High Risk: You have multiple COVID-19 symptoms. It's recommended to
get tested and isolate yourself.
Conclusion
I believe the trial has shown conclusively that it is both possible and desirable to use
Python as the principal teaching language:
o It is Free (as in both cost and source code).
o It is trivial to install on a Windows PC allowing students to take their interest
further. For many the hurdle of installing a Pascal or C compiler on a Windows
machine is either too expensive or too complicated;
o It is a flexible tool that allows both the teaching of traditional procedural
programming and modern OOP; It can be used to teach a large number of
transferable skills;
o It is a real-world programming language that can be and is used in academia
and the commercial world;
o It appears to be quicker to learn and, in combination with its many libraries,
this offers the possibility of more rapid student development allowing the
course to be made more challenging and varied;
and most importantly, its clean syntax offers increased understanding and enjoyment for
students.
References
https://www.wikipedia.org
https://www.ybifoundation.org