gg=int(input("enter any number from the following :1,2,3,4"))
if gg=='1':
n=(int(input("enter a number:")))
sum1=0
for i in range(1,n):
if(n%i==0):
sum1==sum1+i
if(sum1==n):
print("The number is a perfect number")
else:
print("the number is not a perfect number")
elif gg==2:
n=int(input ("Enter A Number:"))
i=2
sum=0
while (i<=n):
sum=sum+i
i=i+2
print("sum of even numbers", sum)
elif gg ==3:
a=[]
for i in range (3)
x=input("enter a value")
a.append(x)
x= input("enter a value to count frequency:")
f=a.count(x)
print("frequency of ",x,"is=",f)
elif gg==4
a=0
b=1
n=int(input ("Enter No.of Fibonacci to be generated :"))
if n<=0:
print("it is not possible with this value")
elif n==1:
print(a)
elif n>=2:
print("{}, {}". format (a, b), end=' ')
for i in range (2, n):
c=a+b
print (",)". format (c), end=' ')
a=b
b=c
Answers
Answered by
0
Answer:
Traceback (most recent call last):
File "/data/user/0/ru.iiec.pydroid3/files/accomp_files/iiec_run/iiec_run.py", line 31, in <module>
start(fakepyfile,mainpyfile)
File "/data/user/0/ru.iiec.pydroid3/files/accomp_files/iiec_run/iiec_run.py", line 30, in start
exec(open(mainpyfile).read(), __main__.__dict__)
File "<string>", line 3
n=(int(input("enter a number:")))
^
IndentationError: expected an indented block
[Program finished]
Similar questions