For the record: I don't think there's anything wrong in general with trying to improve duplicates, especially if they already got a handful of upvotes.
One of the reviewers rejected it because it deviated from original intent
Possibly. As I mentioned in chat (and roganjosh recapped here), the question doesn't seem to actually have to do with fractions or decimals - that was just the OP's uninformed mental model. While it might make some sense to preserve that language while cleaning things up a bit (after all, other beginners with the same problem might have the same flawed mental model!), the tag edits are not helping. (Tags are primarily for categorizing questions for the benefit of people looking for questions to answer, and somewhat to help curators choose groups of questions to curate. They don't really help external search engines, and the site search is terrible regardless.)
At any rate, it isn't really clear what OP meant by "the variable x = 1/2". You took it to mean x
specifically; I took it to mean the code fragment x = 1/2
(in which case, in 2.x, the answer is no, and this is important for understanding the problem - because OP seems to have assumed the problem was in formatting, when it's actually in the calculation). It's important to understand that beginners - at a level of skill where they'll run into problems like the one described - misuse or misunderstand terminology constantly.
and the other rejected because it did not improve the quality of the post
No, I think you definitely improved the quality overall - although IMO the bit about "split functions, loops or maps" is a distraction that should have been removed. It's not quite clear what OP meant by "split functions" (perhaps the .split
method of strings?) or "maps" (probably the map
builtin? But dict
s can potentially be referred to as "maps" in language-agnostic computer science jargon...), but more importantly it's completely unclear why OP wanted to avoid those specific tools, and also unclear why OP thought they might have been relevant to solving the problem.