#100daysofcode
Read more stories on Hashnode
Articles with this tag
Write a Python program to sort a given array in ascending order : a=[2,4,8,1,4,6] a.sort() print("The ascending order ",a) Output : The ascending...
Write a Python program to check whether a given number is a prime number or not : num = int(input("Enter a number: ")) if num > 1: for i in...
Write a Python program to count the number of vowels in a given string : vowels = set("aeiouAEIOU") count = 0 string = input("Enter a string: ") for...
Write a Python program to check whether a given string is a palindrome or not:- str=input("ENTER THE STRING : ") if str == str[::-1]: ...
Write a Python program to find the factorial of a given number: n=int(input('Enter the number : ')) fact=1 for i in range(1,n+1): ...
Write a Python program to reverse a given string:- str=input("Enter the string : ") print('THE REVERSE OF THE STRING IS :- ',str[::-1]) Output...