Consider the statement:
first_name = “Ayana”;
(i) What is the datatype of first_name?
(ii) Is 325 the same as “321”? Give reason.
Answers
Answered by
4
Answer:
( i ) => The data type will be string as the variable is storing the word ayana which is in double quotes .
( ii ) => No , they are not same . because 321 is integer type whereas 321 is of string type because it is in double quotes.
hope it helps you
Answered by
11
The statement given is:
>>> first_name = "Ayana"
(i) Answer:
The value stored in the variable first_name, "Ayana", falls under the string datatype.
(ii) Answer:
No, 325 is not the same as "321".
Any value put in quotes becomes a string value.
"321", which is in quotes, is not the same as 325. 325 is an integer type value and will be treated like a number instead.
There are mainly 5 datatypes in Python.
1. Numeric
- Integer
- Float
- Complex Numbers
2. Boolean
3. Dictionary
4. Set
5. Sequences
- Strings
- Lists
- Tuples
Similar questions
CBSE BOARD X,
3 months ago
Environmental Sciences,
3 months ago
English,
3 months ago
Economy,
7 months ago
Hindi,
7 months ago
Math,
11 months ago
English,
11 months ago
Science,
11 months ago