Python Assignment # 5
Question:1
Write a Python function to calculate the factorial of a number (a non-negative
integer). The function accepts the number as an argument.
Question:2
Write a Python function that accepts a string and calculate the number of upper
case letters and lower case letters.
Question:3
Write a Python function to print the even numbers from a given list.
Question:4
Write a Python function that checks whether a passed string is palindrome or not.
Note: A palindrome is a word, phrase, or sequence that reads the same
backward as forward, e.g., madam
Question:5
Write a Python function that takes a number as a parameter and check the
number is prime or not.
Question: 6
Suppose a customer is shopping in a market and you need to print all the items
which user bought from market.
Write a function which accepts the multiple arguments of user shopping list and
print all the items which user bought from market.
(Hint: Arbitrary Argument concept can make this task ease)
Question:1
Write a Python function to calculate the factorial of a number (a non-negative
integer). The function accepts the number as an argument.
Question:2
Write a Python function that accepts a string and calculate the number of upper
case letters and lower case letters.
Question:3
Write a Python function to print the even numbers from a given list.
Question:4
Write a Python function that checks whether a passed string is palindrome or not.
Note: A palindrome is a word, phrase, or sequence that reads the same
backward as forward, e.g., madam
Question:5
Write a Python function that takes a number as a parameter and check the
number is prime or not.
Question: 6
Suppose a customer is shopping in a market and you need to print all the items
which user bought from market.
Write a function which accepts the multiple arguments of user shopping list and
print all the items which user bought from market.
(Hint: Arbitrary Argument concept can make this task ease)
No comments:
Post a Comment