at the time of input in the beginning ,
i am getting eof error
i am taking input as follows
n=int(input())
this wrking well on jupyter but not here
at the time of input in the beginning ,
i am getting eof error
i am taking input as follows
n=int(input())
this wrking well on jupyter but not here
Can you please share your code . I will look into it and tell you the issue.
here it is:
N=int(input())
def numpat(N):
num = 1
for i in range(0, N):
num = 1
for j in range(0, i+1):
print(num,end="")
num=num+1
for j in range (i+1,N):
print("*",end="")
print("\r")
numpat(N)
Your logic for the code look wrong . You dont need a for loop as no range os given for which your sum will be positive.This is a much simpler code for your reference .
sum=0
while sum>=0:
i=int(input())
sum+=i
if sum>=0:
print(i)
but I am getting the required output on jupyter, this means the code is correct,and this is not with this particular code,every time i am taking an input, i am getting eof error,or simply error in input,please help me with that
Please share your code by saving it at the given below url and then sharing the saved url with me since in the above code that you shared the indentation are not clear .
Your code is working fine in the ide please running it again.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.