What is the difference between = and == in python?
Answers were Sorted based on User's Feedback
Answer / nashiinformaticssolutions
While // denotes floor division (result is an integer), / denotes precise division (result is a floating point value). For instance:
5//2 = 2 5/2 = 2.5
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / nashiinformaticssolutions
- `/` is the true division operator that always returns a float result, even if both operands are integers.
```python
result = 7 / 3 # Returns 2.3333...
```
- `//` is the floor division operator, which returns the largest integer less than or equal to the result.
```python
result = 7 // 3 # Returns 2
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / glibwaresoftsolutions
- `/` is the true division operator that always returns a float result, even if both operands are integers.
```python
result = 7 / 3 # Returns 2.3333...
```
- `//` is the floor division operator, which returns the largest integer less than or equal to the result.
```python
result = 7 // 3 # Returns 2
```
| Is This Answer Correct ? | 0 Yes | 0 No |
Explain about multi-threading concept in python?
What is the interactive mode?
What are the types of inheritance in python?
What data types does python support?
Name some commonly used built-in modules in python?
What is numpy array?
What are the generator functions in python?
What are the different types of operators in python?
Write a program to find out the name of an object in python.
What is enumerate() explain its uses?
How to find methods or attributes of an object?
What do you think is the output of the following code fragment?