You are on page 1of 5

Name-Debadrito Ray

Class -11
Section-J
Roll no.-19
Computer Practical Examination Block Test
1
1.
n=int(input("Enter a number-"))
sq=n*n
d=0
s=0
while(sq!=0):
d=int(sq%10)
s=s+d
sq=int(sq/10)
if(s==n):
print("The number is a Neon Number")
else:
print("The number is not a Neon Number")

Screenshot of the Output


Screenshot of the Output
2.
for a in range(65,69):
for b in range(65,a+1):
print(chr(b),end="")
print()

Screenshot of the Output


3.
s=input("Enter a string-")
s=s.lower()
cv=0
cc=0
cd=0
cs=0
for a in range(0,len(s)):
if(s[a]=='a' or s[a]=='e' or s[a]=='i' or s[a]=='o' or
s[a]=='u'):
cv=cv+1
elif(s[a].isdigit()==False and s[a]!=' '):
cc=cc+1
for a in range(0,len(s)):
if(s[a].isdigit()==True):
cd=cd+1
elif(s[a].isalnum()==False):
cs=cs+1
print("Number of Vowels-",cv)
print("Number of Consonant-",cc)
print("Number of Digit-",cd)
print("Number of Special Case Character-",cs)
Screenshot of the Output

Screenshot of the Output

You might also like