Visual illustration of the code challenge: Variables et concaténation #2

Variables et concaténation #2

Construction d’une phrase.

Coding in the sandbox You must be logged in to access the sandbox.

Données

Tu as 3 variables à ta disposition :

  • name, une chaine de caractères qui contient un prénom
  • years, un entier qui contient un nombre d’années
  • city, une chaine de caractères qui contient une ville

Réponse attendue

Tu dois retourner la phrase « name habite depuis years ans dans la ville de city. »

Exemple : Alix habite depuis 8 ans dans la ville de Nantes.

Solve the challenge

To code this challenge, several possibilities:
- Want to start coding right away? Use the online Sandbox.
- Want to work in your favorite editor? Organize your code well, test, check out our API documentation.
- You can also copy/paste a dataset below.

challenge code for resolution via API: STARTER_8

Some resources to help you:
Data and algorithmic logic Methodologies Corrections

Support for resolution

Progress through challenges using our resolution aids: tools, techniques and advice to help you overcome the most complex programming challenges with methodology, confidence and creativity.

Dataset and algorithmic logic

Based on the data and the expected response, use the process to determine the logic to implement.

Show data and progress

Methodologies

Develop a structured approach with our solving guides. Work on specific concepts such as object-oriented programming or unit testing to improve your coding style and progress.

No methodology yet for this challenge, but we are working on it! Follow us to be informed of the release!


Corrections

The corrections allow you to discover certain technical concepts but will also give you a solution to the challenge. Code the challenge yourself before consulting the corrections ;)

No answer yet for this challenge, but we&'re working on it! Follow us to be informed of the release!

Programming concept(s) that can be used to solve this challenge: Chaines de caractères

Keep coding

Other challenges to complete

Advance
Attaque des Titans

Attaque des Titans

Le caporal Levi doit affronter des Titans dans le district de Trost. Aide-le à venir à bout de tous les Titans !

Behavioral Corrigé disponible : Python
Intermediate
Meurtre à Synthéria

Meurtre à Synthéria

Un meurtre mystérieux a eu lieu dans un bar. Retrouve le coupable grâce aux indices dissimulés aux 4 coins du bar.

Behavioral
Intermediate
Maman j’ai raté l’avion

Maman j’ai raté l’avion

Kevin McCallister doit défendre seul sa maison de 2 cambrioleurs pendant les fêtes de fin d’année.

Behavioral