0% found this document useful (0 votes)
12 views

Revision XII On Python 02-04-2024

Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Revision XII On Python 02-04-2024

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

REVISION TEST:

1.
2. What is the difference between a keyword and an identifier?
3. What are literals in Python? How many types of Literals allowed in Python
4. What is the difference between an expression and a statement in Python?
5. What are tokens in Python? How many types of tokens allowed in Python?
6. What is the role of indentation in Python? Give an example.
7. Which of the following are syntactically correct strings? State reason.
(a) ”Python is nice Language”
(b) ‟He called me “Friend!” when he came‟
(c) “Very Good‟
(d) ‟This is a good book‟
(e) “Namaste
(f) “I liked ‟Harry Potter‟ very much”
8. Write a Program to obtain temperature in Celsius and convert it into Fahrenheit using formula :
C X 9/5 + 32 = F

9.
10. What will be the output of the following ?
(a)87//5 (b)(87//5.0) == (87//5) (c) 87//5.0 (d) 17%5.0
11. What is the length of the tuple shown below? T = ((((”a‟, 1), ‟b‟, ‟c‟), ‟d‟, 2), ‟e‟, 3)
12. Find out the output generated by following code fragments:
(a) plane = (“Passengers”, ”Luggage”) plane [1] = “Snakes”
(b) (a, b, c) = (1,2,3)
(c) (a, b, c, d) = (1,2,3)
13. WAP to calculate the mean of the numbers of the tuple.
14. WAP to calculate the sum of integers of the list.
15. How are dictionaries different from Lists?
16. WAP to create a dictionary named year whose keys are month names and values are their corresponding
number of days.
17. WAP to find the average of the list of the numbers entered through keyboard.
18. WAP to print the following series –
a. 1 4 7 10 . . . . . . .40
b. 1 -4 7 -10 . . . . . . . . -40

19.
20. Find the output of the following:

You might also like