UrbanPro

Learn Python Training from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

Why does â??5/2 = 2â?? and not 2.5 in Python?

Asked by Last Modified  

Follow 5
Answer

Please enter your answer

Due to dynamic Typing. use Numpy , and declare data type , you will get desired result
Comments

Math Magician

If u would have given data type as integer then it will display only integer value.
Comments

A real time python Trainer

I guess you are using python version 2.7.X python 2.7.x: 5/2 = 2 5.0/2 = 2.5 5/2.0 = 2.5 python 3.X 5/2 = 2.5 5.0/2 = 2.5 5/2.0 = 2.5
Comments

Founder Win Corporate Training IT Corporate Trainer/Coach, Counsellor

Python has two major versions 2.x and 3.x 2.7 - last version for 2.x 3.7 is the latest version in 3.x
Comments

Its actually 2.5 only - notsure where you got the 2 from?
Comments

Enhance your skill set with quick courses in 'python', 'javascript' & 'sap ui5 / fiori / abap'

Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:06:47) on win32Type "copyright", "credits" or "license()" for more information.>>> # real division>>> 5/22.5>>> # floor division>>> 5//22>>>
read more

Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:06:47) [MSC v.1914 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> # real division
>>> 5/2
2.5
>>> # floor division
>>> 5//2
2
>>>

read less
Comments

View 4 more Answers

Related Questions

how can i develop a python project without disturbing python core
We will help you with you requirement.Contact us.Training will enable you to complete the task.
Garimella

I want to learn Python but I dont know which tool is better for the future? and i want to get a job in less time. I am a fresher, 2017 passed out.

Congratulations for passing out in 2017. Learning Python programming language will help you get a job in less time provided you are good in general aptitude,computer science fundamentals. You need to become...
Srinu

I want to learn Python. but I cant decide which application to choose.I don't understand if I should be a Developer, testing or something else which is the future and which is more in demand.

Hello,You should first go for Python basics and practice some basic programming. Then advance your skillset.Python is quick to learn and use Pycharm as the IDE as it is widely used in the industry.
Srinu
Are there coding standards or a style guide for Python programs?
The PEP 8 -- Style Guide for Python Code provides a fairly comprehensive list of Python naming conventions. Here are a few examples, but you should consult the PEP 8 style guide for more detailed information...
A
0 0
7

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

Write your first Python program in 10 minutes
1. Download python from python official site search "python download" in google 2. Install in your machine 3. verify using : "python --version" command 4. Write first program using notepad create...

Python : functional programming characteristics
Functions are first class (objects). That is, everything you can do with "data" can be done with functions themselves (such as passing a function to another function). Recursion is used as a primary...

Why Do People Choose Python?
Lot of programming languages are available in the market today, but why do people choose python over them? What made it different from other scirpting languages. So factors made it unique, as below: Software...

How Machine Learning Predict things - A Short Video for absolute beginners
Here is a short video for Machine Learning Beginners, who want to know how Machine Learning Algorithm predict things

Top Programming Languages 2017: Every Beginner Should Learn
Every year a plethora of job opportunities are being created for skilled programmers. So if you are thinking of honing your coding skills it is really a bright idea. But with so many programming languages...

Recommended Articles

Python is one of the most popular programming languages in the world. It is general-purpose, object oriented, high-level programming language used in a number of programming fields. Python is a great programming language to learn as it will introduce you to the world of programming. If you are from the technical background...

Read full article >

Information technology consultancy or Information technology consulting is a specialized field in which one can set their focus on providing advisory services to business firms on finding ways to use innovations in information technology to further their business and meet the objectives of the business. Not only does...

Read full article >

Whether it was the Internet Era of 90s or the Big Data Era of today, Information Technology (IT) has given birth to several lucrative career options for many. Though there will not be a “significant" increase in demand for IT professionals in 2014 as compared to 2013, a “steady” demand for IT professionals is rest assured...

Read full article >

Business Process outsourcing (BPO) services can be considered as a kind of outsourcing which involves subletting of specific functions associated with any business to a third party service provider. BPO is usually administered as a cost-saving procedure for functions which an organization needs but does not rely upon to...

Read full article >

Looking for Python Training classes?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for Python Training Classes?

The best tutors for Python Training Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Python Training with the Best Tutors

The best Tutors for Python Training Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more