alexmojaki / alexmojaki/futurecoder

Building Up Strings Exercises - Not accepting a working solution

Ouverte
#420 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Python
Étoiles
1.5k
Forks
183
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

For this challenge:

> You're getting good at this! Looks like you need more of a challenge...maybe instead of putting a name in a box, the name should be the box? Write a program that outputs this:

```
+World+
W W
o o
r r
l l
d d
+World+
```

I wrote the following code:
```
name = 'World'
nameWPluses = '+' + name + '+'
print(nameWPluses)
for char in name:
char = char + ' ' + char
print(char)
print(nameWPluses)
```
And my output matches the expected solution (including prompt at the very end):
```
+World+
W W
o o
r r
l l
d d
+World+
>>>
```

And while the code works, it doesn't accept the solution. The debugger makes it look as if there are too many spaces, then when I remove one of the five spaces, the debugger shows that it doesn't have enough.

After looking at the first hint, I noticed that you're expecting a for loop to be used to build up the 5 spaces, that's what I'll work next, but regardless wanted to report this.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.