6 kyu

FIXME: Hello

474 of 2,875dinglemouse

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 Trained9309
Total Skips249
Total Code Submissions19757
Total Times Completed2875
Java Completions474
Python Completions913
JavaScript Completions854
C++ Completions273
Kotlin Completions114
C Completions74
C# Completions234
Lua Completions11
Go Completions24
Total Stars131
% of votes with a positive feedback rating90% of 501
Total "Very Satisfied" Votes414
Total "Somewhat Satisfied" Votes74
Total "Not Satisfied" Votes13
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