PPS
UNIT 1Basic of Python Programming Write a program to reassign values to a variable. Explain the use of return statement with example. What is module? How to create and user define module. Find output- Def min(x,y): If (x<y): Return x Else: Return yPrint(4,5))5. Write a program using function that accept three number, and return true if any of the number is 0, otherwise returns false.6. Define argument. Explain keyword and variable length arguments with example.7. What is package? How to create and use package in python.8. Find output –Def add(x,y) Sum=x+y Return sum Print (“in add method”) Print(add(10,20))9. Fill in the blanks to define a function that prints “positive” if its parameter is greater than 0 and “negative” otherwise.___pos_neg(x): If x>0: ___(“positive”)___ Print(“negative”)10. Explain with example significance of membership operator in string.11. Explain with example how we can concatenate a string and floating point data.12. Write a program to calculate length of a string. Accept string from user.13. Write a program to count occurrences of word in given sentence.(assume suitable data)
0 matching results found