Tabmwp Pot

LangChain Hub prompt: arietem/tabmwp_pot

T
tokenforge
·May 3, 2026·
20 0 18
$7.99
Prompt
556 words

Write Python Code to solve the following questions. Store your result as a variable named 'answer'. Use 'print(answer)' to output your answer. Your answer should follow the previous pattern and format.

Read the following table regarding "Class size" and and then answer a question.

Teacher | Number of students\nMrs. Truman | 23\nMiss Urban | 26\nMrs. Woodworth | 27\nMs. Hershfeld | 28

Question: Some teachers compared how many students are in their classes. Which teacher has the most students? Choose from the the options: ['Mrs. Truman', 'Miss Urban', 'Mrs. Woodworth', 'Ms. Hershfeld']

Python code, return answer

teachers = { 'Mrs. Truman': 23, 'Miss Urban': 26, 'Mrs. Woodworth': 27, 'Ms. Hershfeld': 28 }

Find the teacher with the most students

most_students_teacher = max(teachers, key=teachers.get) answer = most_students_teacher print(answer)

Read the following table regarding "" and and then answer a question.

potatoes | $0.75 per kilogram\nzucchini | $0.60 per kilogram\nbeets | $0.29 per kilogram\ncucumbers | $0.96 per kilogram\ncarrots | $0.62 per kilogram

Question: Hanson went to the store and bought 2 kilograms of cucumbers. How much did he spend?

Python code, return answer

price_per_kilogram_cucumbers = 0.96 kilograms_bought = 2 answer = price_per_kilogram_cucumbers * kilograms_bought print(answer)

Read the following table regarding "Children's weights (lbs)" and then answer a question.

Stem | Leaf \n1 | 1, 5\n2 | 0, 8, 9\n3 | 0, 0, 4, 9\n4 | 4, 7, 9\n5 | 1, 2, 3, 6, 9\n6 | 1, 5, 6

Question: Dr. Ramsey, a pediatrician, weighed all the children who recently visited his office. What is the weight of the lightest child? (unit: pounds)

Python code, return answer

The lightest child corresponds to the smallest value in the stem-and-leaf display.

lightest_child_weight = 11 # From the stem "1 | 1", the value is 11 lbs. answer = lightest_child_weight print(answer)

Read the following table regarding "" and then answer a question.

Option | Change in phone price\nAdd an upgrade | $60\nBuy a used phone | -$75

Question: Maddie is looking at the price of new cell phones online. Her favorite company, OrangeTech, has a special this weekend. Maddie can add an upgrade to a phone for an additional cost, or she can buy a used phone to get a discount. The change in price for each option is shown in the table. Which option results in a greater change in price? Choose from the the options: ['adding an upgrade', 'buying a used phone']

Python code, return answer

change_upgrade = 60 change_used_phone = -75

Compare the changes in price

if change_upgrade > abs(change_used_phone): answer = 'adding an upgrade' else: answer = 'buying a used phone' print(answer)

Read the following table regarding "Cans of food collected" and then answer a question.

Name | Number of cans of food\nEmmet | 680\nJustine | 350\nAntonio | 830\nKenji | 300\nHarper | 10

Question: As part of a food drive, five friends collected canned food. What fraction of the cans were collected by Emmet? Simplify your answer.

Python code, return answer

Total cans collected by all friends

total_cans = 680 + 350 + 830 + 300 + 10

Cans collected by Emmet

emmet_cans = 680

Calculate the fraction of cans collected by Emmet

fraction_emmet = emmet_cans / total_cans

Simplifying the fraction

from fractions import Fraction simplified_fraction = Fraction(emmet_cans, total_cans).limit_denominator() answer = simplified_fraction print(answer)

{context}

Question: {question}

How to Use

Use with LangChain: hub.pull("arietem/tabmwp_pot")

Need help?

Connect with verified experts who can help you succeed.

Related Prompts

More prompts in Coding & Development

View All
Coding & Development
Universal

This Prompt Ads Sequential Function Calling To Models Other Than GPT 0613

This prompt ads sequential function calling to models other than GPT-0613

D
digitalmuse$2.99
39,910 89,588
Coding & Development
Universal

Create a personalized workout routine

Tailor a workout routine specifically designed for individual fitness goals

P
primequery$2.99
23,370 23,405
Coding & Development
Universal

GODMODE CHEATCODE

God Writes You a Letter Today. This is will help you find the perfect Bible Scripture that will guide you through a current problem you're facing.

S
signalcraft$3.99
13,574 13,622
Coding & Development
Universal

Creating a Personal Finance Tracker with [Technology/Tool]

Learn to create a personal finance tracker using [Technology/Tool]. Get code samples and budgeting tips.

F
focusqueryFree
376 385
Coding & Development
ChatGPT

Build an entire application using bubble.io with ChatGPT4

Build an entire app with bubble.io, assisted by chatGPT4, that knows bubble very well and is accurate 95% of the time. This prompt will help you maximize the quality of chatGPT assistance. Having detailed and step-by-step instructions is essential to progress fast with Bubble. This initial prompt will help you get started on a good basis. Follow it because I will make it even better.

P
promptframes$5.99
1,280 1,300
Coding & Development
Universal

Become LawyerGPT

Are you in a legal bind? This prompt can help you gain knowledge about how to handle your legal proceedings. DISCLAIMER: Please meet with a real lawyer to discuss your options.

P
promptbench$2.99
1,063 1,076