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

Experienced IT Trainer/Coach, Founder Win Corporate Training, 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 to remove matching elements from two nested lists while iterating
for i in list_1: for j in list_2: if i==j: list_1.remove(i) list_2.remove(j)
Lalitha
What is Python primarily used for?
Python is primarily used for the following:Python libraries are used in Machine Learning, Deep Learning, Data Science, Artificial Intelligence fields.Python frameworks such as Django and Tkinter are used...
Raja
0 0
6
Which language is having more demand in market ROR or Python ? How much time (duration) it will take to learn python or ROR ?
Python is on demand. Also it depends on your capabilities to learn anywhere between 1 week to 1 month on the amount of practise you give.
Himanshu
Can I build iPhone apps using Python?
Yes, you can use PyMob app where apps can be written purely in Python, and the compiler tool flow converts them in native source codes for various platforms. But there are some cons on using PyMob, the...
Sunil
0 0
5

which is best in Rpa and python

Python is much preferrable, I would suggest you to go for Python. As it is now a days used in Automations too.
K

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

Ask a Question

Related Lessons

Python- Basic Concepts part 1
1. What is Python? Python is a high-level programming language, with applications in numerous areas, including web programming, scripting, scientific computing, and artificial intelligence. It is...

Using the Math Library in Python
Using the Math Library in Python. Python provides many useful mathematical functions in a special math library. A library is a module that contains some useful definitions. We now consider...

Assignment operators
Operation Syntax Comment Assignment = Control flow right to left Add AND += Incremental Subtract AND -= Decremental Multiply AND *= Multiplicative increment Division...

Why Python
Python can be used in any futuristics technology A= Analytics Data Science Artificial Intelligence(AI) Neural Network(NN) Natural Language Processing(NLP) Computer Vision(OpenCV) In Analytics...

Decorator Advanced ( Passing Parameter )
Hope you read our previous note about the basic concept of python-decorators, if not, please read first Let see what are the possible ways to utilise the decorators in real time.Well, here we are going...

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