200k views
1 vote
For example, if a is a string, then print(type(a))

will print -class iste'
What is output by the following code?
print(type("67"))
print (type(67))
print (type("sixty-seven"))

1 Answer

0 votes

Answer:

<class 'str'>

<class 'int'>

<class 'str'>

Step-by-step explanation:

The input

print(type("67"))

will give you the output

<class 'str'>

and the input

print (type(67))

will give you the output

<class 'int'>

and the input

print (type("sixty-seven"))

will give the the output

<class 'str'>

First input give you the output

<class 'str'>

because, the number 67 is an integer but, it is written in the quotes, and the third input give you the output

<class 'str'>

because, it is already a string and also written in quotes. And the second input give you the output

<class 'int'>

because, it is an integer and also written without quotes.

User Amath
by
3.4k points