28. Explain the difference between the two statements mentioned below:
T1=(5) #statement 1
T1=(56) #statement 2
Answers
Answer:
#statement1 contains only 1 element in T1 with a single digit.
#statement2 contains only 1 element in T2 but with two digits.
Explanation:
Please Mark Brainliest
Answer:
Statement 1 is assigning the numeric value 5 to the variable T1. Statement 2 is assigning the string value "5" to the variable T1.
Explanation:
From the above question,
They have given :
T1=5 #statement 1
T1="5" #statement 2
Statement 1 is assigning the value 5 to the variable T1.
Statement 2 is assigning the value 56 to the variable T1, replacing the value 5.
The two statements are assigning different values to the same variable, T1. In statement 1, the value 5 is being assigned to T1, while in statement 2, the value 56 is being assigned to T1. The difference between the two statements is the value that is being assigned to T1.
An int (integer) is a whole number, positive or negative, without decimals, of unlimited length. A float (floating point) is a number, positive or negative, containing one or more decimals.
Statement 1 is assigning the numeric value 5 to the variable T1. Statement 2 is assigning the string value "5" to the variable T1.
For more such related questions : https://brainly.in/question/33979168
#SPJ1