Tabmwp 4shot

LangChain Hub prompt: ariete/tabmwp_4shot

I
iterateai
·May 3, 2026·
28 0 12
$7.99
Prompt
418 words

Write Python Code to solve the following questions. Store your result as a variable named 'answer'. Use 'print(answer)' to output your answer. You should follow the format of the cases below.

Read the following table regarding "Coin collections" and then write Python code to answer a question:

Name | Number of coins Braden | 76 Camilla | 94 Rick | 86 Mary | 84 Hector | 80 Devin | 83 Emily | 82 Avery | 87

Question: Some friends discussed the sizes of their coin collections. What is the mean of the numbers?

Python Code, return answer

number_of_coins_for_different_person = [76, 94, 86, 84, 80, 83, 82, 87] answer = sum(number_of_coins_for_different_person) / len(number_of_coins_for_different_person) print(answer)

Read the following table regarding "" and then write Python code to answer a question:

Price | Quantity demanded | Quantity supplied $155 | 22,600 | 5,800 $275 | 20,500 | 9,400 $395 | 18,400 | 13,000 $515 | 16,300 | 16,600 $635 | 14,200 | 20,200

Question: Look at the table. Then answer the question. At a price of $155, is there a shortage or a surplus? Choose from the the options: [shortage, surplus]

Python Code, return answer

quantity_demanded_price_155 = 22600 quantity_supplied_price_155 = 5800 if quantity_demanded_at_price_155 > quantity_supplied_at_price_155: answer = 'shortage' else: answer = 'surplus' print(answer)

Read the following table regarding "Cans of food collected" and then write Python code to answer a question:

Samir | 7 Kristen | 4 Dakota | 7 Jamie | 8 Maggie | 9

Question: Samir's class recorded how many cans of food each student collected for their canned food drive. What is the median of the numbers?

Python Code, return answer

cans = [7, 4, 5, 8, 9] cans = sorted(cans) middle1 = (len(cans) - 1) // 2 middle2 = len(cans) // 2 answer = (cans[middle1] + cans[middle2]) / 2 print(answer)

Read the following table regarding "" and then write Python code to answer a question:

toy boat | $5.54 toy guitar | $8.23 set of juggling balls | $5.01 trivia game | $8.18 jigsaw puzzle | $5.30 toy dinosaur | $3.00

Question: Lorenzo has $13.50. Does he have enough to buy a toy guitar and a set of juggling balls? Choose from the the options: ['yes', 'no']

Python Code, return answer

guitar_price = 8.23 juggling_balls = 5.01 total_money = 13.5 if total_money > juggling_balls + guitar_price: answer = "yes" else: answer = "no" print(answer)

Read the following table regarding {table_title} and then write Python code to answer a question:

{table}

Question: {question}

How to Use

Use with LangChain: hub.pull("ariete/tabmwp_4shot")

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