Class 6th Python
Class 6th Python
th
What is python ?
Python was conceived in the late 1980s by Guido van Rossum at Centrum
Wiskunde & Informatica (CWI) in the Netherlands as a successor to the ABC
programming language, which was inspired by SETL, capable of exception
handling and interfacing with the Amoeba operating system. Its implementation
began in December 1989.
Some major features of python
Build a website
Develop games
Program games
Perform scientific computation
Develop artificial intelligence application
Variable
A Python variable is a symbolic name that is a reference or pointer to an
object. Once an object is assigned to a variable, you can refer to the object by
that name. But the data itself is still contained within the object. For example: >>>
>>> n = 300.
Datatype
You write your Python code in a text file with a name like hello.py . How does
that code Run? There is program installed on your computer named
"python3" or "python", and its job is looking at and running your Python
code. This type of program is called an interpreter
compiler
In Python, we use input() function to take input from the user. Whatever you
enter as input, the input function converts it into a string. If you enter an integer
value still input() function convert it into a string. Syntax: input(prompt)
Scirpt mode
So, Script mode in Python is where we first write the Python program inside
a script file and execute it after that. We can execute the script of code either
using the command prompt or using Python IDE installed in our system.
Intaractive mode
Interactive mode is a command line shell which gives immediate feedback
for each statement, while running previously fed statements in active
memory. As new lines are fed into the interpreter, the fed program is evaluated
both in part and in whole.
Arithmetic operator