Saturday, April 4, 2020

Python Application Programming - Module 2 - 17CS664, 18CS55


  1. Explain for and while loop. Write a program to generate fibonacci series up to the given limit by defining fibonacci (n) function.
  2. Mention the advantage of continue statement. Write a program to compute only sum of even numbers within the natural number using continue statement.
  3. Define string. Illustrate how it can be traversed using for loop. 
  4. What are string slices. Explain  the slicing operator in python with examples.
  5. Write a python program to display presence of given substring in main string.
  6. How computational faults or computational errors are handled in python.
  7. Write a python program to copy all lines beginning with vowels from  SAMPLE.txt to VOWEL.txt retaining other lines.
  8. With syntax, explain finite and infinite looping constructs in python. What is the need for break and continue statements.
  9. Write a python program to generate and print prime numbers between 2 to 100.
  10. Write a python program to count the number of occurrences of a given word in a file.
  11. Write a python program that takes decimal number as input and convert that to binary equivalent and return the same.
  12. List any five methods associated with strings and explain each of them with an example.


No comments:

Post a Comment

Database Management systems - Module 2

1 a. Explain the entity integrity and referential integrity constraints.   Why is each considered important. Give examples.    b. Discuss eq...