0% found this document useful (0 votes)
3 views1 page

Python Viva Questions

The document lists a series of Python viva questions covering fundamental concepts such as data types, string manipulation, loops, functions, and file handling. It also includes questions on advanced topics like regular expressions and exception handling. Each question prompts for explanations or examples to demonstrate understanding of Python programming.

Uploaded by

deekshasn18
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

Python Viva Questions

The document lists a series of Python viva questions covering fundamental concepts such as data types, string manipulation, loops, functions, and file handling. It also includes questions on advanced topics like regular expressions and exception handling. Each question prompts for explanations or examples to demonstrate understanding of Python programming.

Uploaded by

deekshasn18
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Python Viva Questions

1. What are data types in Python? Name a few with examples.

2. How does string concatenation and replication work in Python?

3. How can you convert temperature from Fahrenheit to Celsius in Python?

4. Explain the use of conditional statements in Python with an example.

5. Write the syntax of a while loop. How is it different from a for loop?

6. What is a function in Python? How do you call a function?

7. How does a recursive function work? Give an example.

8. Explain how lists work in Python. How do you add, remove and access elements?

9. What is the difference between a list and a dictionary in Python?

10. How would you calculate mean, variance and standard deviation from a list of numbers?

11. What are string manipulation functions in Python? Name a few with examples.

12. How can you validate user input in Python?

13. What is a regular expression? How is it used in Python?

14. How can you retrieve lines from a file that match a particular pattern?

15. Write a Python regex to convert a date from 'YYYY-MM-DD' to 'DD-MM-YYYY'.

16. What is file handling in Python? Name different file operations.

17. How do you read, write and append to a text file in Python?

18. How can you identify misspelled words in a text file using Python?

19. What is the use of 'with open() as' syntax in file handling?

20. How would you handle exceptions in Python? Give an example.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy