Python Basic Questions

Python Basic Questions

\

Parser: What is the position of the parser

we use the parser to have the code translated to the byte code level


  • Hardware is highly protective

os is the complete author of the hardware

os has a component called kernel(linux) HAL for windows


  • datatype in the python is Number Sequence type listtuplesetdicstringBoolean nonecomplex type


  • Display the list of packages in python

Python list


  • display the path in the python

python --list-paths


  • What is os package

import OS


  • what is the sys package

import sys

os.path.dirname(sys.executable)


  • What is module

we are using the program in the same application called the module

  • What is package

A collection of modules that are developed in an application, Which are used in a different application is called a package.


  • What is Stdin

“standard input device file”


  • EOL : End of the LIne



  • How would you represent your code in long line

we use “““ ““““ to store. It is also called Documentation string and documentation and the string is called documentation string

  • to clear the screen in python, we can use the Command

os.system(“cls”)


  • Why we need to use Print()\

Anything to the output will be the object


  • Does print return any thing

The print does not return anything, IT just print

  • What are the parameters in print()

we have *Objects, sep, file, flush


  • How to tell Python the version

we can use #!Python3

Import os

os.system(“cls”)


  • What is the type conversion

we are using type conversation to covert the objects or we can say converting one data type to another datatype

  • What is auto-type inferencing intelligence

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

  • What is the datatype in Python

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


  • What are type classes

(to recognize the data type )Type classes come into the picture When python wants to catch the data type


  • what is the use of type class in Pythonthe type class is an operation in Python that assigns the datatype at runtime in the execution



  • What is a Python garbage collector? In Python garbage collector will automatically remove the old value in the memory



  • what are cascade declaration and initializationauto allocate the same value to one namespace (address in the application)


  • How will you see the datatype for a class w e can use type(“object“) we can see the type of the class


  • What is bit artictureit is a form how much data is transfer in a sec 32 bit 64bit 128bit



  • what are the data input standards in pythonWe have the basic standared like keyboardit can interact with python CLI(Command line interface)when we are accepting the data it need to be assigned to a variable declared in python All the data that is accepted in python will be a string by default Any number will also be auto-converted in the “string”


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

  • we can use Hex() it will give the hex value



  • why you cannot use the input value in adding any two integer as there the int value will be converted to the int value.



  • What is type casting

to convert one data type to another datatype


  • Python we have type conversion, how many types are there

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



  • what is the data type which is in input()we are going to have every input value as string


  • How will you convert the datatype in python we should be calling the corresponding type class constructor method
  • What is the code you will see when type casting immediately

Typeconstructor(input())

  • how the code will look when it is in the later type converstionvariable = input()result = typeconstructor(variable)


  • When data type are changing for the same value are the memory location same or changing they will have different memory locations.

  • why do we use compound statementswe use compound statements for optimization.speed of assigment is good and speed of optimization of greatexample for a compound statement is value +=30
  • What are bit-wise operator and or


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

  • what is a block in Python called

it is called a suit

  • What is an indentation in Python

it calculates the block only with the indentation.

  • What are the control structure in Python

sequence control structure

selection principal control structure

iterative control structure



  • Sequence control structure

programs that are intelligent in the operational implementation, but not in situations or circumstances

  • selection principal control structureselection principal control structure is used when there is any ideal condition.


  • what are selection principal control structures also called?

selection principal control structure also called decision control structure.


  • what are the three keywords for the selection control structure?

IF

Else

Elseif

  • indentation applied in the control structure is single, multiple space, or tab space.


  • all the blocks in the program are called Python suit


#brancin python

  • branching is used by using the if statement.
  • what is the control statement in 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 """

  • do we require to use the brackets for the condition

we do not require but it is profrellisum

  • What is the colen in the python

Colen is used to state that the next are statements.


  • when we are using any type casting in the program and hit enter what are we going to get

we get value error as the input data is null()


  • what if have not used any type of casting and we give an enter to a value?

the value will be accepted as a string and entered.


  • With in the if branch, what is every value considered as true?

Yes within the if branch any value is considered as true except 0 as it is the only thing that is considered false.


  • when if is handling a single state of operation or expression eith in the true state or false state we can keep the operation statement immediately after the colon, either in if or else.

































``

要查看或添加评论,请登录

SHOAIB SHAIK的更多文章

  • spaCy part 1

    spaCy part 1

    spacy is an interesting production-ready, deployable package that help in the processing the language processing with…

  • Project Nessie

    Project Nessie

    Project Nessie is an open-source transactional catalog for data lakes, built to provide Git-like semantics for data…

  • BIG QUERY- Part 1

    BIG QUERY- Part 1

    Simple Answer to understand Part 1 what is bigquery big query is a fully manged service that helps the user and eng to…

  • Responsibility for the data engineer part 2

    Responsibility for the data engineer part 2

    Technical Responsibilities You must understand how to build architectures that optimize performance and cost at a high…

  • What does the data engineering do.

    What does the data engineering do.

    data engineer do a set of operations aimed at creating interface and mechanisms for flow and access of the information,…

    1 条评论
  • Big Query - GCP

    Big Query - GCP

    What is BigQuery? How does BigQuery work? BigQuery administration and access BigQuery best practices and cost…

  • Deep Learning Intro 1

    Deep Learning Intro 1

    Deep learning is a computer technique to extract and transform data—with use cases ranging from human speech…

  • Hadoop FLUME SQOOP

    Hadoop FLUME SQOOP

    Hadoop NameNode Metadata Discusses the components of Hadoop NameNode metadata, including fsimage and edits files, and…

  • SQL Basic 1

    SQL Basic 1

    Client/Server Architecture After the era of mainframes, the shift was towards client/server systems where a main…

  • LINUX Basic 1

    LINUX Basic 1

    The text provides an overview of various commands and utilities in Linux, including regular expressions, #grep, #find…

社区洞察

其他会员也浏览了