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

What's the coolest thing you've done with Python?
Make a fun game
J.k.kavyadharshini
0 0
5
Hi, I'm BCA graduate, and I have seven years in the general insurance field now I want to change my profile and upgrade my knowledge. Will learning python help me with my growth in my career?
Hi, as far as my knowledge goes first, you should learn data processing tools or programs like MS Excel, Power Bi, or SQL then you should then take a leap into Python, which will make automating your work quite simple.
Supriya
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

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

Bigdata hadoop training institute in pune
BigData What is BigData Characterstics of BigData Problems with BigData Handling BigData • Distributed Systems Introduction to Distributed Systems Problems with Existing Distributed...

Be prepared to get trained--init
Before starting the training,students must be mentally prepared for acceptance of new knowledge. Students must attend training with open minded forgetting the position they are working.This will help...
S

Smartnub Softsolutions

0 0
0

JAVA - Object Cloning
JAVA - Object Cloning Is the way of creating the same copy of object without calling the class constructor. It means we can make any class object multiple times without calling its default constructor....

Python (Concepts and Importance)
Python is a general-purpose, interpreted, object-oriented programming language. Python was created by "G. V. Rossum" in the Netherlands in 1990. Python has become a famous programming language widely used...

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