Choose a right statement. int myage = 10; int my,age = 10; int myage = 10; int my age = 10; O int myage = 10; int my-age = 10; int myage = 10; int my_age = 10; SUBMIT ANSWER
Answers
Answered by
3
According to Python Language,
int myage = 10
int my_age = 10
Only the above two statements are correct.
For int my,age = 10 ; int my-age = 10,
- The identifiers or variables in python cannot include any special symbol in it.
- In the two of the above statement comma(,) and hyphen(-) is used which is illegal. It will result in an error by the interpreter.
Answered by
0
Explanation:
- We know that according to Python Language,
int myage = 10
int my_age = 10
- The statements mentioned above are the correct ones.
- This is because, in python, there should not be the presence of any special symbol in identifiers or variables.
- That is why the statements given below are incorrect:
int my,age = 10
int my-age = 10
- The use of symbols like a comma and hyphens will cause an error by the interpreter.
Hence, the right statements are int myage = 10 and int my_age = 10.
#SPJ2
Similar questions