Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
100% found this document useful (2 votes)
452 views

Assignment Module 3

This document discusses variables in Python. It asks whether certain variable assignments can or cannot be executed according to Python's naming rules. It also asks how to delete variables in Python. The assignments Age1=5 and Age_1=100 can be executed, while 5age=55 and age@1=100 cannot due to rules that variables must start with a letter or underscore. Variables can be deleted in Python using the del function.

Uploaded by

Kamlesh Nikam
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
452 views

Assignment Module 3

This document discusses variables in Python. It asks whether certain variable assignments can or cannot be executed according to Python's naming rules. It also asks how to delete variables in Python. The assignments Age1=5 and Age_1=100 can be executed, while 5age=55 and age@1=100 cannot due to rules that variables must start with a letter or underscore. Variables can be deleted in Python using the del function.

Uploaded by

Kamlesh Nikam
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

MODULE 3 Variables

1. What will be the output of the following (can/cannot):


a. Age1=5
b. 5age=55

2. What will be the output of following (can/cannot):


a. Age_1=100
b. age@1=100

3. How can you delete variables in Python ?

################ Assingments MODULE 3 Variables ################

#1. What will be the output of the following (can/cannot):a.Age1=5

Age1=5 # it can run or execute

print(Age1)

#1. What will be the output of the following (can/cannot):b.5age=55

5age=55 # it cannot run or execute due to as per rules of variables it will start from alphabetes

#2. What will be the output of following (can/cannot):a.Age_1=100

Age_1=100 # it can run or execute

print(Age_1)
#2. What will be the output of following (can/cannot): b.age@1=100

age@1=100 # it cannot run or execute due to aper the rules of variables it will start from
either alphabets or underscore symbol only.

#3. How can you delete variables in Python ?

#Ans. by using the del function we delete the variables

a=5

del a

print(a)

You might also like