6 kyu

FIXME: Hello

478 of 2,954dinglemouse

Description:

The code provided has a method hello which is supposed to show only those attributes which have been explicitly set. Furthermore, it is supposed to say them in the same order they were set.

But it's not working properly.

Notes

There are 3 attributes

  • name
  • age
  • sex ('M' or 'F')

When the same attribute is assigned multiple times the hello method shows it only once. If this happens the order depends on the first assignment of that attribute, but the value is from the last assignment.

Examples

  • Hello.
  • Hello. My name is Bob. I am 27. I am male.
  • Hello. I am 27. I am male. My name is Bob.
  • Hello. My name is Alice. I am female.
  • Hello. My name is Batman.

Task

Fix the code so we can all go home early.

Debugging

Stats:

CreatedMay 27, 2018
PublishedMay 27, 2018
Warriors Trained9521
Total Skips257
Total Code Submissions20225
Total Times Completed2954
Java Completions478
Python Completions946
JavaScript Completions876
C++ Completions283
Kotlin Completions117
C Completions75
C# Completions237
Lua Completions12
Go Completions27
Total Stars134
% of votes with a positive feedback rating90% of 511
Total "Very Satisfied" Votes422
Total "Somewhat Satisfied" Votes75
Total "Not Satisfied" Votes14
Total Rank Assessments4
Average Assessed Rank
6 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
7 kyu
Ad
Contributors
  • dinglemouse Avatar
  • asmgf Avatar
  • kazk Avatar
  • Blind4Basics Avatar
  • Voile Avatar
  • KataSideKick Avatar
  • clcraig Avatar
  • FArekkusu Avatar
  • HoshinoTented Avatar
  • hobovsky Avatar
  • trashy_incel Avatar
  • PetitLu117 Avatar
  • Runaho Avatar
Ad