Python Basic Questions
SHOAIB SHAIK
?? Published author, AI and Deep learning; fascinated with technology with a deep passion to use technology to make the world a better place. Time, space, Quantum computing are traits I am happy to be involved.
\
Parser: What is the position of the parser
we use the parser to have the code translated to the byte code level
os is the complete author of the hardware
os has a component called kernel(linux) HAL for windows
Python list
python --list-paths
import OS
import sys
os.path.dirname(sys.executable)
we are using the program in the same application called the module
A collection of modules that are developed in an application, Which are used in a different application is called a package.
“standard input device file”
we use “““ ““““ to store. It is also called Documentation string and documentation and the string is called documentation string
os.system(“cls”)
Anything to the output will be the object
The print does not return anything, IT just print
we have *Objects, sep, file, flush
we can use #!Python3
Import os
os.system(“cls”)
we are using type conversation to covert the objects or we can say converting one data type to another datatype
on fly, the datatype is decided by the python
Auxiliary memory
we are using this for the permanent storage
Statical typing
we can type the value in a static type
According to the python a datatype is actually a declared class in the python namespace
every datatype in python prescribes the
properties of the instance
behaviors of its instance
(to recognize the data type )Type classes come into the picture When python wants to catch the data type
What is ecoing in input()
we are taking the input value at the run time and then we are printing the same value in the CLI it is called ecoing
How can you get the hexa decimal value in the python
to convert one data type to another datatype
We have two type of type conversion we are below
immediate-type casting
later type casting
it is type converstion the developer will convert the input value at the scaned time
领英推荐
the developer will capture will capture the valeue as a string and when scanned input value in any expression the developer will convert the scanned data object to the required data type
Typeconstructor(input())
how will converter the decimal number in binary vale
we can use the bin() function to show the binary value
how will you use the standardized bit fill operators to fill the remaining bits
we can use the zfill() function.
what is Compound assigment
we are assigning the function and doing the calculation at the same time.
If statement
simpleif
it is called a suit
it calculates the block only with the indentation.
sequence control structure
selection principal control structure
iterative control structure
programs that are intelligent in the operational implementation, but not in situations or circumstances
selection principal control structure also called decision control structure.
IF
Else
Elseif
#brancin python
""" We have Sequential control selective /(decision ) iterative control """
""" the branching principles in Python is implemented using the if keyword if always execute a condition to make the program execute applying selective control statement the values that can return the bollen function can only be used in the if statement we have IF and else if and else if """
we do not require but it is profrellisum
Colen is used to state that the next are statements.
we get value error as the input data is null()
the value will be accepted as a string and entered.
Yes within the if branch any value is considered as true except 0 as it is the only thing that is considered false.
``