Visual illustration of the code challenge: Figures géométriques

Figures géométriques

Des figures géométriques, il en existe une infinité ! Mais on va y aller tranquillement, avec 4 classiques.

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

Mission

Des figures géométriques, il en existe une infinité ! Mais on va y aller tranquillement, on démarre avec 4 classiques :

  • Un triangle qui a 3 côtés identiques
  • Un carré qui a 4 côtés identiques
  • Un pentagone qui 5 côtés identiques
  • Un hexagone qui a 6 côtés identiques

Régles

Une série de forme est donnée dans « shapes ». Sous la forme d’une chaine de caractères, chacune contient :

  • Le nom de la forme
  • La longueur du côté (tous identiques)

Tu dois retourner :

La somme totale des périmètres de toutes les figures.

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: GEOMETRY_1

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 ;)

Programming concept(s) that can be used to solve this challenge: Géométrie, Conditions, Fonctions

Keep coding

Other challenges to complete

Beginner
Affaire BL4CKWELL – Docteure Synapse

Affaire BL4CKWELL – Docteure Synapse

Analyse une séquence temporelle piratée, détecte les anomalies cachées dans un algorithme sophistiqué.

Calculation Corrigé disponible : PHP
Intermediate
Environnement #1

Environnement #1

Parce que la sensibilisation à l’écologie, ça n’a pas de prix.
Calcule la réduction d’émissions de CO2 de ta voiture avec l’ajout d’équipements spéciaux !

Calculation
Beginner
Orion – Défense spatiale #2

Orion – Défense spatiale #2

Continue ton analyse pour définir la vague la plus puissante parmi celles en approche.

Calculation