Subscribe to this blog

NEWSLETTER

Search This Blog

Featured post

DevOps means a concept to bring Development team and operation team together. So that you can speed up the deployment process. Before you start learning the tools you need to understand core principles. The useful DevOps Principles to know for your project and interviewsTo deliver rapidly without affecting qualityCommunication and Collaboration are the key ideas in DevOps conceptMultiple deploys are possible- if code in Development team automatedOnce you commit the repository, it tests the code automatically against the automated test scriptsIf Build is successfully passed, it installs automatically in Testing environment When infrastructure is automated, it installs automatically to other serversMinor changes takes place in isolation, that means , it creates separate server to deploy minor changesSpeed in Devops, organizations to better serve their customers and compete more effectively in the market.Quality and Security teams are part of DevOpsAutomating the process, much better pro…

Calculate Circle Area the Logic You Need to write in Python

In Python, you can calculate circle area easily by using function. The purpose of Python is to use in data analysis.

You need this logic in many areas. You can use in your present finance projects or new ones.

Benefits of function you can re-use the same code number of times

Area of Circle=pi*r*r

Area of Circle Steps Given - You Can do Using Two Methods, Explained Both Methods

I have given steps to calculate area of circle using two different methods. First I followed by creating an user defined function. Next directly I ran the formula in interpreter.

Method-1

Steps I have followed to Calculate Area Using Function

Logged into Cent Os (Linux)

Create .py module

Import .py module into Python

Execute .py module

1. Log in

I have first logged into CentOS. You can see there '$'.

2. Creating .py module

To create .py module. You can use vi editor command.

You need 'import decimal' to get Decimal values. Else you will get only integer.

I have given pwd command. Which tells present working directory.

There you can give ls command.

You can see list of .py modules. Here, you can see two kinds of modules. Those are .py and .pyc.

The .py is our module, which contain function to calculate Circle area. The .pyc module is Python compiled module will store in the same directory. When you first import the module in Python, the .Pyc module will create by Python.

3. Import Module from Operating system

You need to first go to Python using Python command. There, you can give import module-name.

Comments

Post a Comment

Most Viewed

I am practicing Hyperledger. This is one of the top listed blockchains. This architecture follows R3 Corda specifications. Sharing the interview questions with you that I have prepared for my interview.

Though Ethereum leads in the real-time applications. The latest Hyperledger version is now ready for production applications. It has now become stable for production applications.The Hyperledger now backed by IBM. But, it is still an open source. These interview questions help you to read quickly.
The below set of interview questions help you like a tutorial on Hyperledger fabric.
Hyperledger Fabric Interview Questions1). What are Nodes?
In Hyperledger the communication entities are called Nodes.

2). What are the three different types of Nodes?
- Client Node
- Peer Node
- Order Node
The Client node initiates transactions. The peer node commits the transaction. The order node guarantees the delivery.

3). What is Channel?
A channel in Hyperledger is the subnet of the main blockchain. You c…