Ws-1 Python Introduction Worksheet 1
Ws-1 Python Introduction Worksheet 1
3. Identify invalid variable name(s) out of the following. State reason if invalid
5)Identify the invalid variable names. State the reason if invalid. 1 [2018]
(i) Marks Unit (ii) Product_1 (iii) Sales123 (iv) 2Marks
8. Write the type of python keywords and user defined identifiers from the
following:
(i) For (ii) Delete (iii) else (iv) Value
9. Write the type of python keywords and user defined identifiers from the
following :
(i) case (ii) _delete (iii) while (iv) 21stName
10. Write the type of python keywords and user defined identifiers from the
following:
(i) in (ii) While (iii) and (iv) Num_2
11) Write the type of tokens from the following: 1[SP 20]
(i) if (ii) roll_no
12. Which of the following are valid operators in Python? [comptt 19]
(i) += (ii) ^ (iii) in (iv) && (v) between
(vi) */ (vii) is (viii) like
14. Which of the following is valid arithmetic operator in Python: [SP 20]
(i) // (ii) ? (iii) < (iv) and
15. Identify the valid arithmetic operator in Python from the following.
(i) ? (ii) < (iii) ** (iv) and [SP 21]
16) Write the names of any four data types available in Python. 2[2019]
19)Write the value that will be assigned to variable x after executing the
following statement:
x = 3 + 36/12 + 2*5
20. Write the value that will be assigned to variable c after executing the
following statement:
C = 25-5*4/2-10+4
21. Write the value that will be assigned to variable x after executing the
following statement:
x = 20 -5 + 3 * 20/5
23)
Give the output
(i) print(20,sep="-",end="$")
(ii) print(40,50,60,sep="*",end="!")
(iii) print("hello,hi,bye",sep="*",end="!")
(iv) print("hello","hi","bye",sep="*",end="!")
(v) print(2>5,7<10,end="@")
(vi) print(“2*3,6*5”,sep="%")
(vii) print(2*3,6+5,sep="+")