This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Write a function solution that returns a string of length N consisting | |
of alternating characters: "+" and "-", starting with a "+" character. | |
You can assume N is between 1 and 100. For ex, given N=5, | |
your function should return "+-+-+" and given N=4, it should return "+-+-". | |
*/ | |
#include <iostream> | |
std::string compose(int n) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
In the game of golf, each hole has a par, meaning, | |
the average number of strokes a golfer is expected | |
to make in order to sink the ball in the hole to | |
complete the play. | |
Depending on how far above or below par your strokes are, | |
there is a different nickname. | |
Your function will be passed par and strokes arguments. | |
Return the correct string according to this table which |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PyQt5 import QtCore, QtGui, QtWidgets | |
from pathlib import Path | |
import os | |
import sys | |
# Variable that holds the path where the .py file will be placed | |
savePath = "" | |
# Variable that holds the path/name of the settings file | |
settingsFilePath = Path("settings.txt") |