User:Contribution/Ups & downs notation in Python: Difference between revisions
Contribution (talk | contribs) No edit summary |
Contribution (talk | contribs) No edit summary |
||
| Line 50: | Line 50: | ||
return f"{letter}{int((fi * 4) % 7 + 1)}" | return f"{letter}{int((fi * 4) % 7 + 1)}" | ||
def octave_str(o | def octave_str(o): | ||
return "" if o == 0 else f" {'+' if o > 0 else '-'}{abs(o)}" | return "" if o == 0 else f" {'+' if o > 0 else '-'}{abs(o)}" | ||