6 kyu

FIXME: Hello

433 of 2,541dinglemouse

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 Trained8265
Total Skips225
Total Code Submissions18199
Total Times Completed2541
Java Completions433
Python Completions821
JavaScript Completions751
C++ Completions241
Kotlin Completions109
C Completions71
C# Completions199
Lua Completions7
Total Stars116
% of votes with a positive feedback rating90% of 471
Total "Very Satisfied" Votes387
Total "Somewhat Satisfied" Votes71
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
Ad