1.Get the Input from the User(Name) and that Name should be (words) maximum to 10 words and minimum to 5 words
name=”webgapp”
length=(len(a))
if(length>=10):
print(“Your Name is too Long”)
elif(length<=4):
print(“Your Name is too Short”)
else:
print(“The Given Length of the Name”,length)
2.Write a program the user likes different colour.Here the user name should be constant and colur should be dynamically
colour=input(“enter favorite colour:”)
print(“webgapp”,”likes”,colour,”colour”)
3.Check whether the number is positive number or negative number
number=int(input(“enter a number:”))
if(number>0):
print(“it is positive”)
elif(number<0):
print(“it is negative”)
4.Check Whether the People is eligible to vote
age=int(input(“enter your age:”))
if(age>=18):
print(“you are eligible to vote”)
else:
print(“you are not eligible to vote”)
5.Write a Program for Simple Intrest in Python
p=int(input(“enter the principle amount:”))
n=int(input(“enter no.of years:”))
r=int(input(“enter the rate of interest:”))
si=(pnr)/100
print(“simple interest=”,si)
6.Print the Calendar Program Using Python
import calendar
year = 2017
<!–display the calendar–>
print(calendar.calendar(year))
7.Print the Calendar Program Using Python here specific Month
import calendar
year = 2023
month = 4
<!— display the calendar–>
print(calendar.month(year, month))
8.Add a Two numbers in a Python Using Function
def add(a,b):
print(a+b)
add(10,20)
add(40,50)
add(200,1000)
9.Compare two strings whether it is equal or not
string1=”allan”
string2=”nalla”
print(string1==string2)
10.Calculate the Sum of Digits what the user enters
sum=0
n=int(input(“no.of digits:”))
while (n>0):
sum=sum+n
n=n-1
print(sum)