199k views
1 vote
Which of the following statements is True?

A. Python works only with web-based platforms.
B. The type of a variable in Python is determined at runtime
C. Python supports 2 types of programming methods - functional and structured
D. Python cannot be used to generate dynamic web pages

User Twonky
by
8.2k points

1 Answer

4 votes

Final answer:

The true statement is that the type of a variable in Python is determined at runtime, which highlights its nature as a dynamically typed language. Python is also multi-paradigm, not limited to just functional and structured methods, and can be used for generating dynamic web pages.

Step-by-step explanation:

The statement which is true among the given options is: B. The type of a variable in Python is determined at runtime. This means that Python is a dynamically typed language, which doesn't require explicit declaration of the type of a variable. The interpreter infers the type at runtime based on the value assigned to the variable.

Statement A is false because Python can be used on various platforms, not just web-based. It is a versatile language suitable for a range of applications including desktop, server, and scripting among others.

Statement C is also false. Python supports multiple programming paradigms, including object-oriented, functional, structured, and aspect-oriented programming methods.

Statement D is incorrect because Python can indeed be used to generate dynamic web pages. Web frameworks like Django and Flask are designed for Python to develop dynamic and database-driven websites.

User James Wise
by
8.3k points