“Schools are designed on the assumption that there is a secret to everything in life; that the quality of life depends upon knowing that secret; that secrets can only be known in orderly successions; and that only teachers can properly reveal these secrets. An individual with a schooled mind conceives of the world as a pyramid of classified packages accessible only to those who carry the proper tags.”
@Wolgwang yeah I don't think I am in a position to advice anyone about coding, I have barely any experience in that. But all I can say now to you is just "Try to think like a computer" and that should solve some problem :D
a=input("enter the string")
b=len(a)
for i in range(0,int( b/2+0.5)):
if i != int((b-1)/2):
print(" "*i, a[i], " " *(7-2-2*i),a[b-1-i])
else:
print(" "*i, a[i], " " *(7-2-2*i))
@Wolgwang This works only when no of letters in string is odd
@napstablook I have to submit objections and feedback on the NTSE portal before 10 December. I am going to submit this but I think I am lacking support document in the bio question (they are not directly written in class 11,12 NCERT ).
a = input("Enter string : ")
for i in range(0, int((len(a)+1)/2)-1):
s = ""
for j in range(0,i):
s += " "
s += a[i]
for j in range(0,len(a)-2*i):
s += " "
s += a[len(a)-1-i]
print (s)
s2 = " "
for i in range(0,int((len(a)-1)/2)):
s2 += " "
print (s2+a[int((len(a)-1)/2)])
I just saw a pattern in the errors and "fixed" it now 😏
a = input("Enter string : ")
for i in range(0, int((len(a)+1)/2)-1):
s = ""
for j in range(0,i):
s += " "
s += a[i]
for j in range(0,len(a)-2*i-2):
s += " "
s += a[len(a)-1-i]
print (s)
s2 = ""
for i in range(0,int((len(a)-1)/2)):
s2 += " "
print (s2+a[int((len(a)-1)/2)])
@RajdeepSindhu my teacher used to call minus sign - "magic stick" , "beta isse jaadu hota hai, aur ander ke sign change ho jaate hai " ( this is grade 6th btw ).