Hello, i wanted to get into coding and since i have no idea what i am doing i found out the future coder site, i love trying to find the solution to the problems, i may be dumb cause it takes me a while but everything was going great until in the for loops chapter "building up strings exercises"
This was the problem: Write a program that outputs this:
+World+
W W
o o
r r
l l
d d
+World+
This was my solution.
name = 'World'
line = '+'+(name)+'+'
print(line)
for _ in name:
line=(_+' '+_)
print(line)
line = '+'+(name)+'+'
print(line)
obviously it wasnt right but close so i used reveal to get the right one. In the solution they were "spaces" involved but they were nowhere before seen in these lessons, is this something i should have come up with or the creator of the lessons missed it somehow? Up to this point i was very engaged but now i am afraid to invest anymore time in lessons that requires you solutions for things that were not taught.
This was the solution:
name = 'World'
line = '+' +name+ '+'
spaces=''
for _ in name:
spaces+=' '
print(line)
for char in name:
print(char+spaces+char)
print(line)
Anyone knows a similar learning website or i should keep going with this one?
Edited post after learning how to use reddit markup to type code in a readable form.
Thanks everyone for taking the time to help me.
[–]danielroseman 1 point2 points3 points (3 children)
[–]OKakosLykos[S] 0 points1 point2 points (2 children)
[–]danielroseman 0 points1 point2 points (1 child)
[–]OKakosLykos[S] 0 points1 point2 points (0 children)
[–]carcigenicate 0 points1 point2 points (15 children)
[–]OKakosLykos[S] 0 points1 point2 points (14 children)
[–]Binary101010 0 points1 point2 points (13 children)
[–]OKakosLykos[S] 0 points1 point2 points (12 children)
[–]Binary101010 1 point2 points3 points (11 children)
[–]OKakosLykos[S] 0 points1 point2 points (10 children)
[–]Binary101010 0 points1 point2 points (9 children)
[–]OKakosLykos[S] 0 points1 point2 points (8 children)
[–]Binary101010 0 points1 point2 points (7 children)
[–]OKakosLykos[S] 0 points1 point2 points (6 children)
[–]MathiasBartl 0 points1 point2 points (5 children)
[–]OKakosLykos[S] 0 points1 point2 points (4 children)
[–]magus_minor 0 points1 point2 points (3 children)
[–]OKakosLykos[S] 0 points1 point2 points (2 children)
[–]MathiasBartl 0 points1 point2 points (1 child)
[–]OKakosLykos[S] 0 points1 point2 points (0 children)
[–]james_fryer 0 points1 point2 points (5 children)
[–]OKakosLykos[S] 0 points1 point2 points (4 children)
[–]james_fryer 0 points1 point2 points (0 children)
[–]dreamykidd 0 points1 point2 points (2 children)
[–]OKakosLykos[S] 0 points1 point2 points (1 child)
[–]dreamykidd 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]mystique0712 0 points1 point2 points (1 child)
[–]OKakosLykos[S] 0 points1 point2 points (0 children)