Answer to a question being wrong

Course Name: Python for Trading: Basic, Section No: 2, Unit No: 2, Unit type: Iframe

the quention asked when X=22, so what kind of command will we use to denote it? the options were string, int, float.

My knowledge demands it to be int because the number is an integer, the predetermined answer says it to be string

Hello Anubhab,

In python, the string is enclosed either with single quotes or double quotes.

As you can see, in the question, 22 is enclosed with double quotes. Hence x is a string.



I hope this helps!