Created
February 18, 2025 10:14
-
-
Save allanj/8c1a35903966013ecfee1602f355166e to your computer and use it in GitHub Desktop.
python prompt for few-shot prompting
This file contains hidden or 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
PYTHON_PROMPT = '''Question: after resting they decided to go for a swim . the depth of the water is 5 times ron 's height . dean is 11 feet shorter than ron . if ron stands at 12 feet how deep was the water ? | |
# solution in Python: | |
def solution(): | |
"""after resting they decided to go for a swim . if the depth of the water is 10 times dean 's height and he stands at 6 feet how deep was the water ?""" | |
dean_height = 6 | |
water_depth = 10 * dean_height | |
result = water_depth | |
return result | |
Question: debby bought 264 water bottles when they were on sale . if she drank 15 bottles a day for 11 days . how many bottles does she have left ? | |
# solution in Python: | |
def solution(): | |
"""debby bought 264 water bottles when they were on sale . if she drank 15 bottles a day for 11 days . how many bottles does she have left ?""" | |
debyy_bought = 264 | |
bottle_drink = 15 | |
day_drink = 11 | |
bottle_drink_total = bottle_drink * day_drink | |
bottle_left = debyy_bought - bottle_drink_total | |
result = bottle_left | |
return result | |
Question: he then went to see the oranges being harvested . he found out that they harvest 28 sacks of ripe oranges and 52 sacks of unripe oranges per day . how many sacks of oranges will they have after 26 days of harvest ? | |
# solution in Python: | |
def solution(): | |
"""he then went to see the oranges being harvested . he found out that they harvest 28 sacks of ripe oranges and 52 sacks of unripe oranges per day . how many sacks of oranges will they have after 26 days of harvest ?""" | |
ripe_oranges = 28 | |
unripe_oranges = 52 | |
day_harvest = 26 | |
total_oranges_per_day = ripe_oranges + unripe_oranges | |
total_oranges = total_oranges_per_day * day_harvest | |
result = total_oranges | |
return result | |
Question: melissa scored a total of 21 points playing some games . is she scored 7 points in each game . how many games did she play ? | |
# solution in Python: | |
def solution(): | |
"""melissa scored a total of 21 points playing some games . is she scored 7 points in each game . how many games did she play ?""" | |
total_points = 21 | |
points_per_game = 7 | |
total_games = total_points // points_per_game | |
result = total_games | |
return result | |
Question: rachel picked 7 apples from her tree . thereafter 2 new apples grew on the tree . now the tree has 6 apples still on it . how many apples did the tree have to begin with ? | |
# solution in Python: | |
def solution(): | |
"""rachel picked 7 apples from her tree . thereafter 2 new apples grew on the tree . now the tree has 6 apples still on it . how many apples did the tree have to begin with ?""" | |
picked_apples = 7 | |
new_apples = 2 | |
remaining_apples = 6 | |
total_apples = remaining_apples - new_apples + picked_apples | |
result = total_apples | |
return result | |
Question: Aaron starts with 81 erasers. He gives 34 to Doris. How many erasers does Aaron end with? | |
# solution in Python: | |
def solution(): | |
"""Aaron starts with 81 erasers. He gives 34 to Doris. How many erasers does Aaron end with?""" | |
start_erasers = 81 | |
give_erasers = 34 | |
end_erasers = start_erasers - give_erasers | |
result = end_erasers | |
return result | |
''' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment