Computer Science, asked by hafizashad111, 11 months ago

explain with examples that python is case sensitive language.

Answers

Answered by ranisrinivas1974
3

Python language is case sensitive

Case sensitive means that x is different from X. The variable of John is different from the variable of john. If we assume a value for x (lowercase x) and then call X (uppercase X), we will see the following error message:

Copy

>>>x=2

>>>X

Traceback (most recent call last):

File "<pyshell#1>", line 1, in <module>

X

NameError: name 'X' is not defined

>>>

In the preceding example, X is not assigned any value. Thus, when we call it by typing X, we will receive an error message. Note that the last line mentions NameError instead of TypeError. In Python, we use name for variables.

Answered by Arbrahimbadsa
2

Answer:

Here's a simple example.

Python is Case Sensitive. Let's first define two functions

def Name():

print('Hello World');

def name():

print('My name is Arb');

As you can see, the first function starts with captital N and the second one starts small n, hence they two are two different functions.

Similar questions