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

I want to learn Python in a month. Please help me for this.
Hi Gourab. I teach Python from basic level to advanced topics ---- teach them online. If you are interested , please contact me. I have a total IT experience of over 28 years and a regular Corporate and Individual Trainer.
Gourab

What are the two techniques of Machine Learning?

There are three main techniques: 1) Supervised learning 2) Unsupervised learning 3) Reinforcement learning
Janvi
As a fresher I have done Python training, but hardly getting response from any company. What should I do?
only having training in Python is not enough to be called for intervew. Better you should get real time certification course form reputed organisation with smart hand-on real project exposure. Try to have...
Yamini
0 0
6
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
SVM is applicable only for numeric data or can also be for textual data?
Any learning algorithm for that matter does not work Directly on text. It needs to be converted to a structured matrix before applying algorithms.The methods involve - 1. Extensive cleaning of the data...
Harsha

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

Ask a Question

Related Lessons

map function in python
The function map takes a function and an iterable as arguments and returns a new iterable with the function applied to each argument. Example: def add_five(x): return x+5 nums = result = list(map(add_five,...

How to know if an object is iterable?
An object in python is said to be an iterable if it obeys one of the following two rules:- 1. Object must consist of __getitem__ method 2. Object must consist of __iter__ method. String objects generally...

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...

All About Python You Need To Know Before Starting
Python for Beginners------Anyone can learn Python Prerequisites to learn Python To learn Python we don’t require the knowledge of any other programming languages. To learn all other programming...

Be A Python Dev
Currently, in the programming world, Python is one of the languages with a high rising demand profile. And this article will explain why that isn’t slowing down in the foreseeable future.Python...

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