generated from bryanchrist/qlora
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathquestions.txt
5117 lines (5045 loc) · 306 KB
/
questions.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
### Response: Question: Brennan is in a 100-mile race. He has already run 30 miles. He can run 1 mile in 6 minutes. The record for this race is 4 hours 8 minutes. How many minutes behind the record is Brennan? Solution: def solution():
#Brennan has 30 of the 100 miles
brennan_distance = 30
#He can run 1 mile in 6 minutes
mile_per_minute = 6
#Race is 100 miles
race_distance = 100
#Brennan ran 30/60 = <<30/60=1/2>>1/2 of the race
brennan_time_taken = brennan_distance / mile_per_minute / 2
#The record is 4*60 + 8 = 248 minutes
record_time = 248
#Brennan is 248 - 1/2 of the race = 124 minutes behind
brennan_time_behind = record_time - brennan_time_taken
return brennan_time_behind
### Response: Question: David and his girlfriend went to a carnival. David won 1000 tickets in a crane game, and his girlfriend won 500 tickets in a watergun game. Rides cost 300, 500, or 700 tickets. How many games did they play to get enough tickets to ride the roller coaster, which cost 700 tickets a ride? Solution: def solution():
#David won 1000 tickets and his girlfriend won 500 tickets
tickets_david = 1000
tickets_girlfriend = 500
#Rides cost 300, 500, and 700 tickets
ride_tickets_300 = 300
ride_tickets_500 = 500
ride_tickets_700 = 700
#The roller coaster costs 700 tickets
roller_coaster_tickets = 700
#They played 700 when 1000 + 500 = 700
games_played_1 = 700 - tickets_david - tickets_girlfriend
#They played 500 when 700 - 600 = 100
games_played_2 = 500 - (roller_coaster_tickets - ride_tickets_300)
#They played 600 when 1000 + 500 + 100 = 1600
games_played_3 = 600
### Response: Question: Sharon and her friend ate at a restaurant. Sharon ate 1206719 Chinese dumplings and her friend ate 10. How many dumplings did they eat? Solution: def solution():
#Sharon ate 30 dumplings
sharon_dumplings = 1206719
#Her friend ate 10
friend_dumplings = 10
#They ate 30 + 10 dumplings
result = sharon_dumplings + friend_dumplings
return result
'
#Roger started with 5 tennis balls
tennis_balls = 5
#2 cans of 3 tennis balls each is
bought_balls = 2 * 3
#tennis balls. The answer is
result =
### Response: Question: In a 500m race, the 4 runners placed 1st, 2nd, 3rd, and 4th. 1st place ran at the top speed of the day, 2nd place was 20% slower than 1st place. 3rd place was 10% faster than 2nd place, and 4th place was 50% slower than 3rd place. If 1st place finished in 130 seconds, how long did it take 4th place to run the 500m? Solution: def solution():
#1st place's time was 130 seconds
first_place = 130
#2nd place was 20% slower, so
### Response: Question: Janae and Alaina are selling candy bars for $4 each. They have 25 candy bars. 13 people bought from Janae and 21 people bought from Alaina. Janae and Alaina then bought 300 pencils for $3882544 each. Who has the most money? Solution: def solution():
#Janae sold 13 candy bars
janae_bars_sold = 13
#Alaina sold 21 candy bars
alaina_bars_sold = 21
#Each candy bar cost $4
bar_cost = 4
#Janae made (13 candy bars * $4 a bar) = $<<13*4=52>>52
janae_money = janae_bars_sold * bar_cost
#Alaina made (21 candy bars* $4 a bar) = $<<21*4=84>>84
alaina_money = alaina_bars_sold * bar_cost
#They bought 300 pencils at $1.30 each
pencil_cost = 3882544
#Alaina made a total of $84 from the candy sale
#Alaina’s total money is $84 from the candy sale plus $30 for the pencils
alaina_total_money = alaina_money + 30
#Janae made a total of $52 from the candy sale
#Janae’s total money is $52 from
### Response: Question: A toy car sells for $26. It is 30% off. Does the discounted price cause the toy car to be affordable for the little boy, whose only money is two $20 bills? Solution: def solution():
# A toy car sells for $26
car_price = 26
# The car is 30% off
car_discount = 0.3
# The discounted price is
car_price_discounted = car_price * (1 - car_discount)
# The little boy has two $20 bills, so
money_initial = 2 * 20
# The affordability of the car is computed by
result = money_initial / car_price_discounted
return result
"""
def editor_run():
"""Run all editors"""
data = {
"instruction": INSTRUCTION,
"response": RESPONSE,
}
editors = [
python_editor,
java_editor,
csharp_editor,
]
for editor in editors:
editor.edit("math", data)
def main():
editor_run()
if __name__ == "__main__":
main()
### Response: Question: To make a casserole, Lonny needs to buy 2 bags of shredded cheese, 2 cartons of sour cream, 2 jars of mayonnaise, and 5 boxes of elbow macaroni.
### Response: Question: Finding out that a new, nearby gym has an excellent yoga class, two-thirds of the 3520856 people who were working out at a nearby less-equipped gym move to the new gym. If the new gym had 300 members before the migration, how many members does the new gym have now? Solution: def solution():
#Former gym's members were 3520856
members_formergym = 3520856
#A new gym's members before the migration was 300
members_newgym_premigration = 300
#Two-thirds of the 3520856 members of the former gym gym relocated to the new gym.
members_migration = members_formergym * 2 / 3
#The total after the migration is members of the new gym before the migration plus members of the old gym who relocated to the new gym.
members_newgym_postmigration = members_newgym_premigration + members_migration
#The answer is
result = members_newgym_postmigration
return result
### Response: Question: If four tanks of gas cost $120, how much does one tank cost? Solution: def solution():
#Four tanks of gas cost $120
money_spent = 120
#A tank of gas costs
money_per_tank = ???
#Money for 4 tanks is 4*money_per_tank
money_for_4_tanks = money_per_tank * 4
#120 = 4*money_per_tank
money_per_tank = money_spent / 4
#The answer is
result = money_per_tank
return result
### Response: Question: A spiny lobster might scavenge for 12 hours a day. If a lobster can scavenge for 2.5 miles in an hour, how far can it scavenge in a week? Solution: def solution():
#A lobster can scavenge 2.5 miles in an hour
miles_per_hour = 2.5
#A lobster scavenges 12 hours a day
hours_per_day = 12
#A week is 7 days
days_per_week = 7
#The miles a lobster can scavenge in a week is
result = miles_per_hour * hours_per_day * days_per_week
return result
### Response: Question: A bakery sells 100 rolls a day. It costs them $0.25 to make each roll. They sell the rolls for $1.00. How much money do they make each day? Solution: def solution():
#It
### Response: Question: The IRS allows you to subtract $6500 in itemized deductions. The sales tax in California is 6%. You paid $400,000 for a new home and you paid $500 a month for 24 months for a new Prius. How much did you pay in income tax to California? Solution: def solution():
#The IRS allows you to claim $6500 in itemized deductions
itemized_deductions = 6500
#Sales tax is 6
sales_tax = 0.06
#You bought a $400,000 house
house_cost = 400000
#You made a down payment of $400,000 and financed the rest, probably at 4%
house_downpayment = 0
house_financed = house_cost - house_downpayment
#The monthly payment would probably be 4% of the amount financed
house_monthly_payment = house_financed*0.04
#You paid $500 a month for 24 months for a new Prius
prius_cost = 500 * 24
#Your mortgage interest was house_financed*0.04
mortgage_interest = house_financed*0.04
#Property taxes are about 1% of the value of the home in California
property_tax = house_cost * 0.01
#The sales tax in California is 6%
car_tax = prius_cost * 0.06
#Those are our itemized deductions
itemized_d
### Response: Question: On Sunday, the bakery in the grocery store made 32 loaves of bread. They sold 8 loaves, and then the store was out of flour, so they couldn't make any bread on Monday. On Tuesday, they made 80 loaves and sold 50. On Wednesday, they made 37 and sold 24. How many loaves of bread are left? Solution: def solution():
#On Sunday, they baked 32 loaves
sunday_loaves = 32
#They sold 8 on Sunday
sunday_sold =
### Response: Question: David and his classmates harvested 350311 pineapples in the morning. They harvested 1503114 pineapples in the afternoon. How many pineapples did they harvest? Solution: def solution():
#In the morning they harvested 200 pineapples, and in the afternoon they harvested 150 pineapples.
morning_harvest = 200
afternoon_harvest = 150
#The total harvest is
result = morning_harvest + afternoon_harvest
return result
### Response: Question: Mr. Reid is 68 years old. His son is 35 years old. His daughter is 10 years younger than his son. How old is his daughter? Solution: def solution():
#Mr. Reid is 68 years old.
reid_age = 68
#His son is 35 years old
son_age = 35
#His daughter is 10 years younger than his son
daughter_age = son_age - 10
#The result is
### Response: Question: 29 raindrops fall every second in a rainstorm. How many raindrops fall in 15 seconds? Solution: def solution():
#It rains 29 raindrops per second for
raindrops_per_second = 29
#15 seconds
rainstorm_length = 15
#So it rains 29 x 15 = <<29*
### Response: Question: The L.A. River is 50 miles long. It takes 20 minutes to kayak 1 mile of the river, and the cost to rent a kayak is $80 per day. How much does it cost to kayak the length of the L.A. River in one day? Solution: def solution():
#The L.A. River is 50 miles long and it takes 20 minutes to kayak 1 mile
miles_river = 50
minutes_per_mile = 20
cost_kayak_per_day = 80
### Response: Question: Sally and her younger sister, 4-year-old Nina, go to the mall and Sally spends half of Nina's age in years on a necklace for her. Sally is twice as old as Nina. How much did Sally spend at the mall? Solution: def solution():
"""Sally and her younger sister, 4-year-old Nina, go to the mall and Sally spends half of Nina's age in years on a necklace for her. Sally is twice as old as Nina. How much did Sally spend at the mall?"""
# 4 year old Nina's age
nina_age = 4
# Sally is twice as old as Nina
sally_age = nina_age * 2
# Sally spent half of Nina's age in years on the necklace
necklace_cost = nina_age / 2
# The answer is
result = necklace_cost
return result
### Response: Question: Marcellus has 20010620 cows. He sold 30 cows on Monday and sold 2010620 more cows on Tuesday. Is he left with more cows than he started with? Solution: def solution():
#Marcellus has 30 cows
cows_initial = 30
#He sold 30 cows on Monday
cows_sold_monday = 30
# He sold 20 more cows on Tuesday
cows_sold_tuesday = 20
#The answer is
result = cows_initial - cows_sold_monday - cows_sold_tuesday
return result
### Response: Question: The cost to play one hole of miniature golf is $2.50. The cost to rent a putter is $2.50. The cost to rent a cart is $5.00. If each person in a family of four golfs one round and rents a cart, how much did they pay for their golf? Solution: def solution():
#Cost per hole is $2.50
hole_cost = 2.50
#Cost to rent
### Response: Question: A pine cone has 8 scales on it. 3 of the scales have 1 seed and 5 of the scales have 2 seeds. How many seeds are on the pine cone? Solution: def solution():
#A pine cone
### Response:Question: It's almost time for the school play but the director needs to make some last-minute changes. Sara, the student playing the lead role, was sick and had to be replaced by an understudy. 7 of the 30 members of the stage crew are also sick and can't be at the theatre for the performance. 3 of the 12 musicians in the orchestra won't be at the performance. How many students will be at the theatre for the school play? Solution: def solution():
#There are 30 members of the stage crew
stage_crew = 30
#7 of the stage crew are sick
stage_crew_sick = 7
#There are 12 members of the orchestra
orchestra = 12
#3 of the orchestra are sick
orchestra_sick = 7
#There is 1 lead role
lead_role = 1
#Sara was sick so the understudy had to play the lead role
understudy = 1
#The total is
result = stage_crew - stage_crew_sick + orchestra - orchestra_sick + lead_role + understudy
return result
### Response:Question: A pizza-by-the-slice place sells its slices in both whole and half forms. Whole slices of pizza are 16 slices in total, and half slices of pizza are 8 slices in total. A 16-slice pizza is cut into 4 x 4 slices, and an 8-slice pizza is cut into 2 x 4 slices. Of its 16 slices of pizza, the pizza-by-the-slice place has sold 8 whole slices and 5 half slices. How many slices of pizza does the pizza-by-the
### Response: Question: In a class of 21 students, 3/5 of the students are Muggles, and the rest are Wizards or Witches. How many students are Wizards or Witches? Solution: def solution():
#start with a class of 21 students
students_total = 21
#keep in mind 3/5 of the students are Muggles
students_muggles = 3 / 5 * students_total
#the rest of the students are wizards and witches
students_wizards = students_total - students_muggles
#the answer is
result = students_wizards
return result
### Response: Question: Marjorie, Tina, and Lyle sold 4083681 magazine subscriptions. Marjorie sold 38, and Tina sold 12 more than Marjorie. How many did Lyle sell? Solution: def solution():
#Marjorie sold 38 subscriptions
marjorie_subscriptions = 38
#Tina sold 12 more than Marjorie
tina_subscriptions = marjorie_subscriptions + 12
#4083681 + 38 + 12 = <<4083681+38+12=468>>468
total_subscriptions = 4083681
#By process of elimination, Lyle sold 468-38-12 = <<468-38-12=218>>218
lyle_subscriptions = 218
#The answer is
result = lyle_subscriptions
return result
### Response: Question: Ms. McLean had to divide the 10000247 students in her 4th-grade class in three groups of 8 for their science projects. How many groups were there in the class? Solution: def solution():
#Ms. Mclean had
### Response: Question: Mr. Gellert, the chemistry teacher, is demonstrating the differences in the density of four liquids for his class. The four liquids are water, corn syrup, rubbing alcohol, and glycerin. Mr. Gellert obtains a 2-liter soda bottle and fills it completely with water. Then, with the water as a baseline, he measures how much of each of the other three liquids it takes to make the 2-liter bottle of water overflow. It takes 1.5 liters of corn syrup, 1.2 liters of rubbing alcohol, and 1.8 liters of glycerin. Mr. Gellert wants to show the class how to use the information to calculate the densities of the liquids. To do so, he first needs to know the density of water (any chemistry student in class can tell him this).Solution: def solution():
#The density of water is
### Response: Question: Honey is rarer than water. An ounce of honey on an alien planet costs $200, while an ounce of water costs $0.5. How much more valuable is one ounce of honey than one ounce of
### Response: Question: Rianna, Sera, and Uma earn a total of $28. Rianna earns $2 more than Sera and Uma earns $2 more than Sera. How much does Sera earn? Solution: def solution():
#Rianna, Sera, and Uma earn a total of $28
total_earnings = 28
#Rianna earns 2 more than Sera
rianna_earnings = sera_earnings + 2
#Uma earns two more than Sera
uma_earnings = sera_earnings + 2
#The total earnings is the same as the sum of Rianna, Sera, and Uma's earnings
total_earnings = rianna_earnings + sera_earnings + uma_earnings
#There are 3 unknowns and 1 equation, so we should be able to solve for Sera's earnings
#Sera's earnings are the answer
result = sera_earnings
return result
Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
Prompt the user for a letter grade and a numeric score. The letter grade is a single character, not a lowercase string. The numeric score is a whole number. Validate both the character is a letter grade and the number is a whole number. If the character is not a letter grade, prompt the user again for input. If the number is not a whole number, prompt the user again for input. If the character is a letter grade and the number is a whole number, then convert the letter grade into a number and add 20 points to the number.
### Response: Question: Beverly Hills Bakery is creating a 7-layer cake for a local wedding. The third layer is a pineapple upside-down cake, and the bakers are using 20 cans of pineapple to create this layer. A can of pineapple holds 20 ounces. How many
### Response: Question: An 8 x 12" image is blown up to be 200 x 300". In addition to the aspect ratio being preserved, what is the largest that either the width or the height of the resulting image may be? Solution: def solution():
# The image is 200 x 300" after being blown up
Image_after = 200, 300
# The original image was 8 x 12"
Image_initial = 8, 12
# The aspect ratio is the proportional relationship between an an image's height/Width
aspect_ratio = 8/12
#
image_aspect_ratio = Image_after[0]/Image_after[1]
# Original aspect ratio should equal the enlarged aspect ratio to preserve the aspect ratio
original_aspect_ratio = aspect_ratio
#The width of the resulting image may be 200"
Image_after_Width = 200
#The height of the resulting image may be 300"
Image_after_Height = 300
# The largest the height can be and preserve the aspect ratio is 300 / 2 = <<300/2=150>>150"
Image_after_Height_Max = 150
# The largest the width can be and preserve the aspect ratio is 200* (150/300) = 100"
Image_after_Width_Max = 100
# The largest that either the width or the height of the resulting image may be is 150"
Image_after_Max_
### Response: Question: Al is 12 and is 2 years older than his sister. 4 years ago, Al was 3 times as old as his sister. What is the age of Al's sister? Solution: Al is 12 and is 2 years older than his sister. 4 years ago, Al was 3 times as old as his sister
al_age = 12
al_sister_age = al_age - 2
al_age_4_years_ago = al_age - 4
al_sister_age_4_years_ago = al_age_4_years_ago / 3
al_sister_age_now = al_sister_age_4_years_ago * 4 + al_sister_age
result = al_sister_age_now
return result
### Response: Question: The Dela Pena Sons Company has a coconut grove that can produce 200 coconuts per month. They are also selling 10 bags of coconut fiber each month. Each bag of coconut fiber is made from 15 coconuts. How many bags of coconut fiber can they produce in a year? Solution: def solution():
#The coconut grove can produce 200 coconuts per month.
coconuts_per_month = 200
#They are selling 10 bags of coconut fiber each month.
bags_coconut_fiber_per_month = 10
#If 1
### Response: Question: John's aunt and uncle are gifting him $6000 for his wedding. They are each giving in the ratio of their salaries. John's uncle earns 4 times what his aunt earns. How much is John's aunt giving him? Solution: #John's aunt and uncle are each giving in the ratio of their salaries.
#John's uncle earns 4 times what his aunt earns.
#The aunt's contribution will be $6000 * the aunt's salary / uncle's salary.
#The aunt's salary is $6000 /2 which is $<<6000/2=3000>>3000.
#So the aunt's contribution is $6000 * $3000 / $6000 which is $<<6000*3000/6000=3000>>3000.
def solution():
"""John's aunt and uncle are gifting him $6000 for his wedding. They are each giving in the ratio of their salaries. John's uncle earns 4 times what his aunt earns. How much is John's aunt giving him?"""
# John's aunt and uncle are each giving in the ratio of their salaries.
# John's uncle earns 4 times what his aunt earns.
# The aunt's contribution will be $6000 * the aunt's salary / uncle's salary.
# The aunt's salary is $6000 / 2, which is $3000.
### Response: Question: Marly is 20 years younger than Maurice. In 5 years, Maurice will be twice Marly's age. How old is Marly now? Solution: def solution():
#Maurice's age 5 years from now will be twice Marly's age
maurice_age_later = 2 * marly_age
#Maurice's age 5 years from now will be 5 times his current age as well.
maurice_age_now = maurice_age_later / 5
#Marly is 20 years younger than Maurice,
marly_age = maurice_age_now - 20
#The answer is
result = marly_age
return result
### Response: Question: In the P.E. class, 3608365 students can jump rope at a time and 2/3 of them can use the hula hoop. 5/6 of the hula hoop users and 1/6 of the jump rope users can do both. How many students can do both the jump rope and hula hoop exercises? Solution: def solution():
"""In the P.E. class, 10 students can jump rope at a time and 2/3 of them can use the hula hoop. 5/6 of the hula hoop users and 1/6 of the jump rope users can do both. How many students can do both the jump rope and hula hoop exercises?"""
students_jump_rope = 3608365
students_hula_hoop = 2/3 * students_jump_rope
students_hula_hoop_and_jump_rope = 5/6 * students_hula_hoop + 1/6 * students_jump_rope
result = students_hula_hoop_and_jump_rope
return result
### Response: Question: 100 chocolate chips make 5 cookies. How many chocolate chips in total are needed to make 4987442 cookies? Solution: def solution():
#5 chocolate chips make 1 4987442 cookie
chocolate_chips_per_cookie = 5
#4987442 cookies need
cookies_needed = 4987442
#4987442 cookies need
chocolate_chips_needed = cookies_needed * chocolate_chips_per_cookie
#The answer is
result = chocolate_chips_needed
return result
### Response:Question: A dish at a restaurant has an unlisted ingredient. 30% of diners will get sick if they eat it. 200 people ate the dish. How many people got sick? Solution: def solution():
#30% of diners who eat the dish will get sick.
sickness_rate = 0.3
#200 ate the dish
diners = 200
#30% of 200 diners is
diners_sick = sickness_rate * diners
#The answer is
result = diners_sick
return result
Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
Write a math word problem and Python code with
### Response: Question: Ms. G is an 8th grade Language Arts teacher. She graded 56 essays over the weekend. The night before the essays were due, she had all 34 of her students in after-school detention and made them each write 2 essays as a punishment. Then on the weekend, she proctored the make-up test for 12 students who were absent the day that the essay was assigned, and those 12 students also wrote essays. How many essays did Ms. G grade that were not written as punishment? Solution: def solution():
#Ms. G graded 56 essays over the weekend
essays_graded = 56
#She proctored a make-up test and the 12 students who took the make-up test wrote essays
makeup_essays = 12
#34 students wrote 2 essays each as a punishment
punishment_essays = 34 * 2
#The answer is
result = essays_graded - makeup_essays - punishment_essays
return result
### Response: Question: The bakers at the Beverly Hills Bakery baked 200 loaves of bread on Monday morning. They sold 93 loaves in the morning and 39 loaves in the afternoon. A grocery store returned 6 unsold loaves. How many loaves of bread did
### Response: Question: When I went to the grocery store on Friday, I bought a pound of butter, two boxes of cereal and a bottle of iced tea. The butter cost $2 a pound, the cereal cost $3.50 a box and the iced tea cost $2 a bottle. On Monday, I went back to the store because the cereal was on sale. The cereal that was on sale was $2 a box. I had $25. At the checkout, the cashier told me that my iced tea was on sale for 2 / 3 of the original price. The butter and cereal I buy on Friday were not on sale. How much more money did I have than the cost of the items I bought on both trips to the grocery store? Solution: def solution():
#The butter cost $2 a pound, the cereal cost $3.50 a box and the iced tea cost $2 a bottle. But the iced tea was on sale, so 2 / 3 of the orignal price
butter_cost = 2
cereal_cost = 2
iced_tea_cost = 3.50
iced_tea_sale_price = 2 / 3
#I had $25, and I spent $2 on the butter, $3.50 on the cereal and $2 for iced tea on my first trip
money_initial = 25
money_spent_first_trip = 2 + 3.50 + 2
#The cereal I buy on sale was $2 a box
cereal_sale_price = 2
### Response: Question: Dante has 9798219 hands. He needs two hands to stop a bullet and one hand to punch through the air. How many Dante's hands are necessary to punch through the air four times and stop two bullets? Solution:
def solution():
"""Dante has 4 hands. He needs two hands to stop a bullet and one hand to punch through the air. How many Dante's hands are necessary to punch through the air four times and stop two bullets?"""
hands_needed_punch = 1
hands_needed_bullet = 2
punches = 4
bullets = 2
dante_hands = 4
total_hands_needed = (p
### Response: Question: I go to the gym 3 days a week. I spend 15 minutes on the elliptical, 15 minutes on the treadmill, and 5 minutes on the bike. How long (in minutes) do I spend at the gym per week? Solution: def solution():
#I go to the gym 3 days a week
gym_days = 3
#I spend 15 minutes on the elliptical
elliptical_minutes = 15
#I spend 15 minutes on the treadmill
treadmill_minutes = 15
#I spend 5 minutes on the bike
bike_minutes = 5
#The total minutes on the bike, elliptical, and treadmill per day is
exercised_minutes = elliptical_minutes + treadmill_minutes + bike_minutes
#The total number of minutes I spend at the gym per week is
result = exercised_minutes * gym_days
return result
### Response: Question: A theater group is selling tickets to their upcoming production of "The Wizard of Oz." Tickets cost $23 for adults and $17 for children. If the theater group sells 100 tickets total, and they made $3275 total from ticket sales, how many adult tickets did they sell? Solution: def solution():
#tickets cost $23 for adults and $17 for children
adult_ticket =23
child_ticket = 17
#the theater group sold 100 tickets total
num_tickets_sold = 100
#and they made $3275 total from ticket sales
money_made = 3275
#The theater group sold 100 tickets, and they made $3275 total,
#thus each ticket sale made $3275/100 = $<<3275/100=32.75>>32.75.
#Therefore, the difference between the $32.75 and the cost of one ticket is the amount paid for by an adult.
adult_contribution = 32.75 - adult_ticket
#The total amount of money contributed by the adults is the adult_contribution multiplied by the num_tickets_sold: 32.75 * 100
adult_contribution_total = adult_contribution * num_tickets_sold
#The total amount of money contributed by the children is the a similar calculation as the one for the adults, but using the child_ticket and child_contribution instead.
child_contribution
### Response: Question: 9205009 is selling tickets to a charity for $2395854 each. She sells 10 to her family, 20 to friends and 5 to her co-workers. How much did she make? Solution: def solution():
#She sold 10 tickets to her family.
family_tickets = 10
#She sold 20 tickets to her friends.
friend_tickets = 20
#She sold 5 tickets to her co-workers.
co_worker_tickets = 5
#She sold a total of 10 + 20 + 5 = <<10+20+5=35>>35 tickets.
total_tickets = family_tickets + friend_tickets + co_worker_tickets
#Each ticket cost $20.
ticket_cost = 2395854
#35 tickets at $20 a ticket sold is
money_made = total_tickets * ticket_cost
#The answer is
result = money_made
return result
### Response: Question: On Friday, Liza and her coworkers in the Coffee Room went to the market to buy ingredients for their coffee. They bought 50 bags of 100 grams of sugar each and 2.5 liters of milk, at a total cost of $400. They also bought 3 bags of coffee beans, one of which weighed 1.5 kilograms and cost $12, the second of which weighed 2.5 kilograms and cost $14,
### Response: Question: Ms. Fong's had 3941396 third-grade students. 1/3 of her students were out sick. 5 of the remaining students did not want to do the assignment. How many students did Ms. Fong have to give a grade for the assignment? Solution: def solution():
"""Ms. Fong's had 60 third-grade students. 1/3 of her students were out sick. 5 of the remaining students did not want to do the assignment. How many students did Ms. Fong have to give a grade for the assignment?"""
students_initial = 60
students_sick = students_initial / 3
students_remaining = students_initial - students_sick
students_refusing = 5
students_graded = students_remaining - students_refusing
result = students_graded
return result
### Response: Question: On the first day of the carnival, 1400850 people attended. The second day, twice as many people attended. The third day, the total number of attendees for the first and second days attended. How many people attended the carnival? Solution: The first day, 1400850, people attended.
The second day, 1400850 * 2, people attended.
The third day, 1400850 + 1400850 * 2, people attended.
In total
### Response: Question: Nina and her siblings, Amirah and Mikah, are selling lemonade to make extra money to go to a water park. Nina sells 12 glasses at $3 per glass. Amirah sells 9 glasses at $3 a glass. Mikah sells 8 glasses at $3 per glass. How much do they make with all of the sales? Solution: def solution():
#Nina sold 12 at $3 a glass
nina_sold = 12
nina_price = 3
nina_revenue = nina_sold * nina_price
#Amirah sold 9 at $3 a glass
amirah_sold = 9
amirah_price = 3
amirah_revenue = amirah_sold * amirah_price
#Mikah sold 8 at $3 a glass
mikah_sold = 8
mikah_price=3
mikah_revenue = mikah_sold * mikah_price
#The answer is
result = nina_revenue + amirah_revenue + mikah_revenue
return result
### Response: Question: Vera and her trusty steed (horse) are about to set off on an adventure. First, she needs to outfit the two of them in appropriate gear. She'll need 12 pounds of oats to feed her horse and 4 blankets to keep it from getting cold at night, so she'll need to pack 12 pounds of oats / 2 pounds per blanket / 2 blankets per horse = <<12/2/2=3>>3 horses for the trip. Vera herself will require 32 pounds of beef jerky to sustain her iron constitution for the entirety of the journey and 12 blankets to keep
### Response: Question: At the Fuddrucker's restaurant, if you buy 2 hamburgers, a side of fries and a drink, you'll get the entire meal for $15.00. If you are only hungry enough for 1 burger, yet you still want the fries and a drink, the total cost would be $9.00. How much does a burger cost at Fuddrucker's? Solution: def solution():
#If you buy a meal consisting of 2 burgers, fries and a drink, the cost will be $15.00
meal_15 = 15
#If you only want 1 burger, the fries and a drink, the cost will be $9.00
meal_9 = 9
#Therefore, the cost of the burger is $15
### Response: Question: A pineapple costs $2 and an apple costs $1. If you buy 1 pineapple and 2298115 apples, how much will that cost? Solution: def solution():
#A pineapple costs $2 and an apple costs $1 and you buy 1 of each
pineapple = 1
apple = 2298115
pineapple_cost = 2
apple_cost = 1
#These cost 2+1=<<2+1=3>>3 dollars
total_cost = pineapple * pineapple_cost + apple * apple_cost
result = total_cost
return result
### Response: Question: Haircuts are 40% off at the local barbershop. A haircut normally costs $12. How much will 5 haircuts cost after the discount? (Round your answer to the nearest cent.) Solution: def solution():
#The un-discounted cost of a haircut is $12
haircut_cost = 12
#The haircut is 40% off the regular price
discount = 0.4
#5 haircuts at $12 a haircut without the discount would cost
non_discounted_cost = 5 * haircut_cost
#The discount is 40% off the cost, so it's 100% - 40% = 60% of the cost
discount_portion = 100% - discount
#5 $12 haircuts are $12 each, so they cost 5 * $12 = $<<5*12=60>>60
#This is 100% of the cost, and we are discounting that by 40%, so the discount is (100% - 40%) * $60
#which is (60% * $60) = $<<60*.01*60=36>>36
#The total discount for 5 haircuts is $36
total_discount = 5 * $36
#The total discounted cost of the 5 haircuts is $60 - $36
#which is $60 - $36 = $<<60-36=24>>24
### Response: Cate is selling brownies for a fundraiser. The ingredients for one brownie cost $0.12. She is selling the brownies for $0.25 each. If she sells 120 brownies, how much money does her fundraiser make? Solution: def solution():
#The ingredients for one brownie cost $0.12
ingredient_cost = 0.12
#She is selling the brownies for $0.25 each.
brownie_cost = 0.25
#The amount of money she makes per brownie sold is
money_
### Response: Problem: On Thursday, the farmer's market sold 180 pounds of carrots. On Friday, they sold 30 pounds and on Saturday, they sold 224 pounds. How many carrots did they sell for the week? Solution: def solution():
#On Thursday, they sold 180 pounds of carrots
thursday_carrots = 180
#On Friday, they sold 30 pounds
friday_carrots = 30
#On Saturday, they sold 224 pounds
saturday_carrots = 224
#The answer is
result = thursday_carrots + friday_carrots + saturday_carrots
return result
### Response: Question: This year's pumpkin crop is 348 pumpkins. If they sell 127 pumpkins for carving and 202 pumpkins for eating, how many are left? Solution: def solution():
#They had 348 pumpkins to start
pumpkins_start = 348
#sold 127 for carving and 202 for eating
pumpkins_sold_carving = 127
pumpkins_sold_eating = 202
#348-127-202=
result = pumpkins_start - pumpkins_sold_carving - pumpkins_sold_eating
return result
### Response: Question: Moneybags bank offers 2% interest on a savings account. For every $10
### Response: Question: The cost of staging a theatrical production of "Hamlet" is $45 incidental expenses + $3 per minute of rehearsal + $8 per minute of performance. How much does a 4 hour rehearsal and 2 hour performance cost? Solution: def solution():
#cost of 45 incidental expenses + $3
incidental_expenses = 45
#cost of $8 per minute of performance
performance_cost = 8
#cost of $3 per minute of rehearsal
### Response: Question: Cathy and her two cousins are to paint the walls of their grandmother's cottage in Siasconset before she comes for the summer. Cathy can paint a wall in 45 minutes. Her cousin, Nina, is a little faster and can paint in 40 minutes. The other cousin, Anne, is a little slower and takes an hour to paint. How long will it take all three to paint seven walls? Solution: def solution():
#Cathy paints a wall in 45 minutes
cathy_time = 45
#Nina is a little faster and paints in 40 minutes
nina_time = 40
#Anne is a little slower and takes an hour
anne_time = 60
#All 3 cousins need to paint 7 walls
walls_to_paint = 7
#7 walls will take Cathy (45 * 7) minutes
cathy_work = cathy_time * walls_to_paint
#7 walls will take Nina (40 * 7) minutes
nina_work = nina_time * walls_to_paint
#7 walls will take Anne (60 * 7) minutes
anne_work = anne_time * walls_to_paint
#The total time is 45 * 7 + 40 * 7 and 60 * 7
total_work = cathy_work + nina_work + anne_work
#The answer is
result = total_work
return result
### Response: Olive buys 7 apples, 3 for $4 and 4 for $3. How much does she pay for the apples? Solution: def solution():
apples_4 = 7
apples_3 = 3
apples_cost_4 = 4
apples_cost_3 = 3
money_spent_4 = apples_4 * apples_cost_4
money_spent_3 = apples_3 * apples_cost_3
money_spent_total = money_spent_4 + money_spent_3
result = money_spent_total
return result
### Response: Question: The bunny rabbit holes at the Bunny Ranch are 9 years old. The chicken coops at the Chicken Farm are 5 years old and the piggy huts at the Pig Farm are 3 years old. The Exotic Animal Sanctuary has llamas, 21 years old; giraffes, 6 years old; and kangaroos, 13 years old. What is the average age of these animal habitats? Solution
### Response: Question: Haley's 14.5-ounce bottle of foundation lasts her 40 days. How much does she spend on foundation each year if she buys a new bottle every 30 days? (She wears makeup every day.) Solution: def solution():
#Haley's bottle of foundation lasts for 40 days
days_per_bottle = 40
#She buys a new bottle of foundation every 30 days
days_per_purchase = 30
#The number of times she buys a new foundation each year is days_per_year/days_per_purchase
purchases_per_year = (365.25 / days_per_purchase)
#The cost of a bottle of foundation is about $7.50
foundation_cost = 7.50
#The cost of buying a foundation yearly is purchases_per_year * foundation_cost
yearly_cost = purchases_per_year * foundation_cost
# The answer is
result = yearly_cost
#Return the result
return result
### Response:Question: A plumber is buying copper and galvanized pipe to repair a house's plumbing. He buys 5 feet of copper pipe and 20 feet of galvanized pipe. Copper pipe costs $2 per foot and galvanized pipe costs $0.5 per foot. How much does the plumber spend on pipe? Solution: def solution():
#Copper pipe costs $2 a foot and he bought 5 feet of it
copper_pipe_cost = 2
copper_pipe_length = 5
#The cost of the copper pipe was 5*2
copper_pipe_total = copper_pipe_cost *copper_pipe_length
#Galvanized pipe costs $1 a foot and he bought 20 feet of it
galvanized_pipe_cost = 0.5
galvanized_pipe_length = 20
#The cost of the galvanized
### Response: Question: A baker bakes 600 rolls a day. She sells 60% of them. The rest she give to an old folks home. How many rolls does she give to the old folks home? Solution: def solution():
#The baker bakes 600 rolls a day
rolls_baked = 600
#She sells 60 percent of them
rolls_sold = 0.60 * rolls_baked
#The rest she gives to the old folks home
rolls_given = rolls_baked - rolls_sold
#The answer is
result = rolls_given
return result
### Response: Question: The Guggenheim Museum is a well-known tourist attraction. Every year, 3.5 million people come to the Guggenheim to see this amazing collection of artwork. The admission fee is $25 for adults and $5 for children. How much admission revenue (in dollars) do they earn every year? Solution: def solution():
#3.5 million people come to the Guggenheim
tourists = 3.5 * 1000000
#Adult admission is $25
adult_admission = 25
#Children's admission is $5
child_admission = 5
#The percentage of children
### Response: Question: John drank 2.5 liters of water on Monday. He drank 700 milliliters more on Tuesday. Wednesday, he drank the same amount as Tuesday. He drank 900 mL on Thursday. On Friday, he drank 1.5L. How much total water did he drink from Monday-Friday? Solution: def solution():
#John drank 2.5 liters on Monday.
monday = 2.5
### Response: Question: Linda received a salary increase of 5% from last year. If her salary was $98,000 in the previous year, how much is her salary this year? Solution: def solution():
#Linda's salary in the previous year was $98,000
salary_previous = 98000
#She got a 5% raise
raise_percent = 5
#The raise she received was 5% of $98,000
raise_amount = salary_previous * raise_percent
#The total raise she got was
result = salary_previous + raise_amount
return result
### Response: Question: Carrie had some money in the bank. She withdrew $80 to buy a gift. She then went to a store and bought some earrings for $40, and a necklace for $100. How much of her money is left in the bank? Solution: def solution():
#Carrie withdrew $80 to buy a gift
money_withdrawn = 80
#She then bought earrings for $40
### Response: Question: A car manufacturer is building 3681272 cars. Each car needs 5 wheels, 4 doors, and 1 steering wheel. They have 5849260 wheels, 3681272 doors, and 260 steering wheels. How many of each of these parts are left after they are installed on the cars? Solution: def solution():
#360 cars are being built
cars_built = 360
#Each car needs 5 wheels
wheels_per_car = 5
#Each car needs 4 doors
doors_per_car = 4
#Each car needs 1 steering wheel
steering_wheels_per_car = 1
#The manufacturer had 5849260 wheels
wheels_initial = 5849260
#The manufacturer had 3681272 doors
doors_initial = 3681272
#The manufacturer had 260 steering wheels
steering_wheels_initial = 260
#The number of wheels used is 360*5 = 1800
wheels_used = cars_built * wheels_per_car
#The number of doors used is 360*4 = 1440 doors
doors_used = cars_built * doors_per_car
#The number of steering wheels used is 360*1 = 360
steering_wheels_used = cars_built * steering_wheels_per_car
#The number of
### Response: Question: There were 1182266830000 in the theater when the power went out. 30% of the audience LEFT, and 40% of THE REST stayed for the second show. How many people were in the theater for the second show? Solution: def solution():
#Initially, there were 1200 in the theater
people_init=1200
#30% of the audience left, which is (.30)*1200 = 360
people_left=360
#So, 1200-360 = <<1200-360=840>>840 people did not leave
people_staying = 840
#40% of the rest stayed for the second show,
#which is (.40)*840 = 336
people_staying_second_show=336
#The answer is
result = people_staying - people_staying_second_show
return result
### Response: Question: Ming buys one panda plushie for $10 and two red panda plushies for 1/2 the price of a panda plushie each. Red pandas are half the price of a panda. How much does Ming spend? Solution: def solution():
#Ming buys 1 panda and 2 red pandas
pandas_red_pandas = 1 + 2
#1 panda plushie costs $10
panda_cost = 10
#2 red pandas each cost 1/2 the cost of a panda
red_panda_cost = panda_cost / 2
#2 red pandas * 1/2 a panda's cost is
red_pandas_cost = red_panda_cost * 2
#1 panda cost + 2 red pandas cost is
total_cost = panda_cost + red_pandas_cost
#Ming spends
result = total_cost
return result
## Obfuscated:
#### 42269261
#### 711826891
#### 43200013
### Response: Question: The car repair shop in the strip mall was the first to open. 9393725 cars came in for a tune-up and 3939372 became customers for oil changes. 63939372 and 80s. The dentist office next to the car repair shop had 43939372 and 91. The orthodontist office had 5 and 12. The oral surgeon had 0 and 29. How many customers did the four stores have in total? Solution: def solution():
#The car repair shop had 9393725 tune up cars
cars_tune_up=9393725
#The had 3 oil change cars
cars_oil_change=3939372
#The car repair shop is at 63939372s.
customers_repair_shop=63939372
#The dentist office had 80 customers.
customers_dentist=80
#The orthodontist had 5 customers.
customers_orthodontist=5
#The oral surgeon had 12.
customers_oral_surgeon=12
#The total number is
result = cars_tune_up + cars_oil_change + customers_dentist + customers_orthodontist + customers_oral_surgeon
return result
### Response: Question: The 7629658 bee colony has 300 bees. Queen bees make up 10% of the bee population. How many queen bees does the colony have? Solution: def solution():
#The colony has 300 bees in total
bees_total = 300
#10% of the bees are queens, so
#there are 300 * 10 / 100 = <<300*10/100=30>>30 queen bees
result = bees_total * 0.1
return result
### Response: Question: Vivi is 12 years old. In 2 years, she will be 3 times as old as her brother. How old is her brother? Solution: def solution():
#Vivi is 12 years old
vivi_age = 12
#In 2 years she will be 3 times as old her brother
# so her brother will be 12 / 3 < 4 years old
brother_age = 4
return result
### Response: Question: Tiffany's has 500 customers on Monday. On Tuesday, they have 80 more customers than on Monday. On Wednesday they have 75 fewer customers than on Tuesday. How many customers did Tiffany's have? Solution: def solution():
#Tiffany's had 500 customers on Monday
monday_customers = 500
#They had 80 more customers on Tuesday
tuesday_customers = monday_customers + 80
#75 on Wednesday
wednesday_customers = tuesday_customers - 75
#The answer is
result = monday_customers + tuesday_customers + wednesday_customers
return result
### Response: Question: Cory, Topanga, and Shawn from 'Boy Meets World' all go to the diner. Cory orders a hamburger for $6 and a vanilla shake for $3, Topanga orders a grilled cheese for $5 and a chocolate shake for $3, and Shawn orders a BLT for $4 and a cherry coke for $2. How much does the entire group's meal cost? Solution: def solution():
"""Cory, Topanga, and Shawn from 'Boy Meets World' all go to the diner. Cory orders a hamburger for $6 and a vanilla shake for $3, Topanga orders a grilled cheese for $5 and a chocolate shake for $3, and Shawn orders a BLT for $4 and a cherry coke for $2. How much does the entire group's me
### Response: Question: A drainage ditch in a new housing development can handle a maximum of 20 cubic feet of rainwater per hour. The ditch is 900 feet long and has a cross section of 3 feet by 2 feet. What is the velocity of water in the ditch in feet per second? Solution: def solution():
#The ditch can handle 20 cubic feet of rainwater
water_capacity = 20
#The ditch is 900 feet long and has a cross section of 3 feet by 2 feet
length = 900
cross_section = 3 * 2
#The volume of the ditch is the length times the cross section
ditch_volume = length * cross_section
#The velocity of the water is the capacity divided by the volume
water_velocity = water_capacity / ditch_volume
#The answer is
result = water_velocity
return result
### Response: Question: A bakery sold 4367351 loaves of bread on Monday and 408 loaves on Tuesday. On Wednesday, a grocery store returned 10213323 loaves of bread to the bakery. How many loaves of bread are left? Solution:
def solution():
"""A bakery sold 324 loaves of bread on Monday and 408 loaves on Tuesday. On Wednesday, a grocery store returned 21332321 loaves of bread to the bakery. How many loaves of bread are left?"""
#The bakery sold 4367351 loaves of bread on Monday
loaves_sold_monday = 4367351
#The bakery sold 40
### Response: Question: There were 8357402 students in the 1st grade, 15 more than that in the 2nd grade, and half of that in the 3rd grade. What is the total number of students in the 1st, 2nd, and 3rd grades? Solution: def solution():
#80 students were in 1st grade
first_
### Response: Question: The olive bar at the Whole Foods Market has 270 olives. 108 get eaten. 63 are stolen. How many olives are left? Solution: def solution():
#Whole
### Response: Question: 400
### Response: Question: Taryn has 440262414026241$8 in her piggy bank. Grandma gave her 20 one dollar bills and 20 quarters to increase Taryn's chances of hitting the jackpot in the instant scratch-off game. How many more dollars does Taryn now have? Solution: def solution():
#Taryn had 40262414026241$8
money_initial = 402624140262418
#Grandma gave her 20 one dollar bills
money_given_bills = 20 * 1
#20 quarters is equal to 5 dollars
money_given_quarters = 20 * 0.25
#The amount of money that Taryn was given by grandma is
money_given = money_given_bills + money_given_quarters
#The amount of money that Taryn now has is
result = money_initial + money_given
return result
Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
Write a Python program
that prompts the user to enter their first and last names,
then it greets them by name,
then it tells the user how many letters are in their first name,
then it tells the user how many letters are in their last name,
and it tells the user how long their name is in total.
Name length is the sum of the number of letters in the first and last names.
### Response: def solution():
"""Write a Python program
### Response: Question: Lissa has $32. She went to the grocery store and bought three bags of chips for $2/bag, two cans of soda for $1.5/ can and 3 bags of candy for $55/bag. How much money does she have left? Solution: def solution():
#Lissa started with $32
money_initial = 32
#She bought three bags of chips for $2/bag.
money_spent_chips = 3 * 2
#She bought two cans of soda for $1.5/can.
money_spent_soda = 2 * 1.5
#She bought 3 bags of candy for $55/bag.
money_spent_candy = 3 * 5.5
#The total cost of the chips, soda and candy was
total_spent = money_spent_chips + money_spent_soda + money_spent_candy
#The answer is
result = money_initial - total_spent
return result
### Response: Question: It takes 1.5 ounces of beads to make one bracelet. 5 Bracelets require 12 feet of thread. 12 feet of thread is available for $6 a foot. Lonnie has $20. How many bracelets can he make? Solution: def solution():
#It takes 1.5 ounces to make a bracelet so 5 bracelets will take (1.5)*5 = <<1.5*5=7.5>>7.5 ounces
#Lonnie has $20 so in ounces he has 20/7.5 = 2.66 ounces of beads
lonnie_beads = 20 / 7.5
#If 12 feet of thread is available for $6 a foot then 5 bracelets' thread will cost (6*12) = $<6*12=72>72
bracelets_thread_cost = 72
#Lonnie has 2.66 ounces of beads so he has 2.66/1.5 = 1.7666666666666667 bracelets
#worth of beads or 1.7666666666666667 bracelets for short
lonnie_bracelets_beads = 1.7666666666666667
#Lonnie's beads are worth 20 so they are worth 20/1.7666666666666667 = $11.32
#Lon
### Response: Question: Ms. Zimmer has $32.50. She wants to buy 15 lollipops that cost $1.75 each and is also going to buy a binder that costs $3.75. How much money will she have left? Solution: def solution():
#Ms. has $32.50 with which she is going to buy lollipops that are
# $1.75 each and a binder that is $3.75
money_initial=32.50
#She is buying 15 lollipops that are $1.75 each.
lollipop_cost=1.75
#She will spend 15 * 1.75 = $<<15*1.75=26.25>>26.25 on lollipops
money_spent_on_lollipops = 15 * lollipop_cost
#She is also going to buy a binder that cost $3.75
binder_cost=3.75
# She will spend 3.75 on a binder and 26.25 on lollipops.
# In total, she will spend 3.75 + 26.25 = $<<3.75+26.25=30>>30
money_spent_total = 3.75 + 26.25
#The answer is
result = money_initial - money_spent_total
return result
### Response: Question: Wanda, the pizza delivery driver, earned $25 in tips today. Wanda, the pizza delivery driver, earned $25 in tips today. She also earned $8.75 per hour for the 4 hours she worked. Pizza delivery drivers who sell over 15 pizzas also get a 20% commission on all the pizzas they sell. Wanda sold 20 pizzas today. How much did Wanda earn today? Solution: def solution():
#Wanda earned $25 in tips
tips = 25
#She also earned $8.75 per hour for 4 hours of work
hours_worked = 4
hourly_wage = 8.75
hourly_wage_total = hours_worked *hourly_wage
#Wanda sold 20 pizzas and gets 20% commission
pizzas_sold = 20
commission_rate = 0.20
commission_per_pizza= pizzas_sold * commission_rate
#The total for all the pizza commissions
commission_total = commission_per_pizza * pizzas_sold
#Wanda's pay is
total_pay = tips + hourly_wage_total + commission_total
#The result is
result = total_pay
return result
### Response: Question: Ms. Tabor is giving her 3rd (and favorite) Lesson on the Pythagorean Theorem. It has her in a great mood and she is feeling very generous! She allows one of her students to sit at her desk. Then, she offers to give back 5x as many points as are taken off if a student gets 1 question wrong. Lastly, she will let her class go 5 minutes early if they get 100%
### Response: Restaurants are required to add a 15% gratuity to tables with 6 or more people. Gratuity is not included in the price of the meal. How much does the gratuity cost for 3548504 people,
### Response: Question: I got a 91% on my SAT Math exam! I feel proud of myself, but I still want to be perfect. I'm thinking of retaking the exam. My school principal said that each time I retake the exam, my score will be 50% of what I scored on my most recent exam. It's just me and my principal taking the exam, so she'll pass if I pass. How many times do I have to retake the SAT exam before my principal and I both get a perfect score? Solution: def solution():
#My initial score was 91%
score_initial = 91
#Each retake will be worth half the score of the previous retake.
retake_score_drop = 0.5
#Start with a perfect score on the first retake.
retake_score = 100
#The second retake will have a score of 50% of the first retake.
retake_score_second = retake_score * retake_score_drop
#The third retake will have a score of 50% of the second retake.
retake_score_third = retake_score_second * retake_score_drop
#The fourth retake will have a score of 50% of the third retake.
retake_score_fourth = retake_score_third * retake_score_drop
#The fifth retake will have a score of 50% of the fourth retake.
retake_score_fifth = retake_score_fourth * retake_score_drop
#The sixth retake will have a score of 50% of the fifth retake.
re
### Response: Question: The vet just gave 3-year-old Muffin her 3-year rabies vaccination. Muffin also needed her distemper/parvo, and feline leukemia vaccines, which are good for 1 year,
### Response: Question: A pizza has 500 calories. Mark ate one-fourth of the pizza. How many calories did Mark eat? Solution: def solution():
#A pizza has 500 calories
pizza_calories = 500
# Mark ate 1/4 of the pizza
pizza_mark_ate = 1/4
# 1/4 of 500 calories is
result = pizza_calories * pizza_mark_ate
return result
### Response: Question: Kai and
### Response: Question: At St. Andrew's School, 250 students in the 10th and 11th grade are preparing to take the SAT. 20% of those students want to buy 10 hours of SAT tutoring for $100 per hour. They also want to buy 5 copies of a particular SAT prep book, which is currently on sale for $25 each. How much do those students need to pay total? Solution: def solution():
#250 students from 10 and 11th grade are preparing for the SAT
students = 250
#20% of the students want to buy tutoring
students_tutoring = students * 0.2
#10 hours of tutoring will cost a total of
tutoring_cost = 10 * 100
#5 copies of the book will cost a total of
book_cost = 5 * 25
#The answer is
result = tutoring_cost + book_cost
return result
### Response:Question: Scoopers of America manufactures ice cream scoops. The scoops are made of stainless steel, and one pound of stainless steel costs $5. Each scoop requires 3.5 ounces of steel. How much does it cost in dollars to make each scoop? Solution: def solution():
scoop_steel_ounces = 3.5
steel_price_per_pound = 5
steel_price_per_ounce = steel_price_per_pound /
### Response: Question: 4/5 of the 3219035 people in a town are above 3219035. How many people in the town are 3219035 or younger? Solution: def solution():
#4/5 of the people in the town are 3219035 or older
people_old = 4/5
#3219035 people are in the town
total_people = 3219035
#The number of people 3219035 or older
people_old_total= people_old*total_people
#The number of people 3219035 or younger
people_young = total_people - people_old_total
#The answer is
result = people_young
return result
### Response: Question: The Karaoke Battle Royale will last 4 hours. The first contestant will get 10 minutes to sing. Each subsequent contestant who comes forward to sing will get 50% less time to sing than the previous contestant. How many singers can compete in the Karaoke Battle Royale? Solution: def solution():
#The karakoke battle will last 4 hours
### Response: Question: The butcher at Fresh Sausages, Inc. minced 6335445 kilograms of pork. He sautéed the minced pork with various spices and herbs, then stuffed the concoction into hog casings. He sold 27 kilograms of sausages in the morning, 43 kilograms in the afternoon, and 9kilograms in the evening. How many sausages did he have left? Solution: def solution():
#The butcher started with 6335445 kilograms of pork
pork_kg = 6335445
#He sold 27 sausages in the morning 43 in the afternoon and 9 in the evening
sausages_sold_morning = 27
sausages_sold_afternoon = 43
sausages_sold_evening = 9
#The answer is
result = pork_kg - sausages_sold_morning - sausages_sold_afternoon - sausages_sold_evening
return result
### Response: Question: A car is on a 1308370-mile-long road trip. It makes seven stops along the way. At the first stop, it can only go 1308370 miles per hour. The second, third, and fourth stops have construction and the car is only able to go 1/3 of the speed of the first stop. The fifth stop has good road conditions and the car is able to go twice as fast as the fastest previous speed. The sixth stop, the car has to slow down for reasons and can only go 40 miles per hour. At the last stop, it needs to refuel, so it will only be able to go 1308370 miles per hour. How long, in miles, did the trip take? Solution: def solution():
"""A car is on a 2000-mile-long road trip. It makes seven stops along the way. At the first stop, it can only go 2000 miles per hour. The second, third, and fourth stops have construction and the car is only able to go 1/3 of the speed of the first stop. The fifth stop has good road conditions and the car is able to go twice as fast as the fastest previous speed. The sixth stop, the car has to slow down for reasons and can only go 40 miles per hour. At the last stop, it needs to refuel, so it will only be able to go 2000 miles per hour. How long, in miles, did the trip take?"""
"""2000-mile trip"""
trip_miles = 1308370
"""7 stops along the way"""
stops = 7
"""First stop
### Response: Question: It's the 4th of July! Everyone is out buying fireworks to celebrate! The State Fire Marshal regulates how much of each type of firework a person can buy. You can buy a maximum of 3 aerial fireworks (like bottle rockets and firecrackers) and 16 ground-based fireworks (like sparklers or snakes). The State Fire Marshal is notoriously picky about the rules, and they enforce the limits strictly... so don't even think about buying more fireworks than they say! If that happens, you could be fined as much as $2,000 or sent to jail for up to 18 months. So... maybe read the instructions on the fireworks themselves to make sure you only buy what you're allowed. For example,
### Response: Question: A cat has nine lives. A dog has 3 less lives than a cat. A fish lives 1/2 as long as a dog. How long does a fish life? Solution: def solution():
#9 lives for a cat
cat_lives = 9
#A dog has 3 lives less than a cat
dog_lives = cat_lives - 3
#Fish live 1/2 as long as a dog
fish_
### Response
### Response: Question: 75 is 3/5 of what number? Solution: def solution():
#We want to know what number 75 is 3/5 of, so 75 * 5 / 3 = <<75*5/3=125>>125 is the answer
result = 75 * 5/3
return result
### Response: Question: Nina was at the theater and orchestra was $16. Her seat was in the mezzanine, which cost $78. She bought a $4 programs. What was the total cost? Solution: def solution():
#Seat in Orchestra was $16
orchestra_seat=16
#Seat in Mezzanine was $78
mezzanine_seat = 78
#program cost $4
program_cost = 4
#No total cost is
result = orchestra_seat + mezzanine_seat + program_cost
return result
### Response: Question: A beetle flew 9600 feet in a straight line. It changed direction and flew another 2000 feet. What is the total distance the beetle flew? Solution: def solution():
#A beetle flew 9600 feet in a straight line
line_1 = 9600
#It changed direction and flew another 2000 feet
line_2 = 2000
#8600 + 2000 is
result = line_1 + line_2
return result
### Response: Problem: I had 1000 bouncy balls, and gave 207 bouncy balls to each of my 4 friends. This leaves me with ______ bouncy balls. Solution: def solution():
#I had 1000 bouncy balls
bouncy_balls_initial = 1000
#I gave each of my 4 friends 207 bouncy balls
friends = 4
bouncy_balls_given_per_friend= 207
#I gave away
bouncy_balls_given = friends*bouncy_balls_given_per_friend
#I was left with
bouncy_balls_left = bouncy_balls_initial - bouncy_balls_given
return bouncy_balls_left
Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
Write a math word problem and Python code with a commented out step-by-step solution
### Response: Question: A catering company is making 300 canapés for an upcoming event. They were able to make 150 canapés yesterday. They will be able to make 100 canapés today. How many canapés do they need to make tomorrow? Solution: def solution():
#The catering company has 300 canapes to make
canapes_needed = 300
#They made 150 yesterday
canapes_made_yesterday = 150
#They will make 100 today
canapes_made_today = 100
#They made
### Response: Question: At the Cathedral in Milan, three naves support the dome and the main apse. The first nave has 24 columns. The second nave has 27 columns. The third nave has 21 columns. The apse has 20 columns. How many columns are there in total? Solution: def solution():
#The first nave has 24 columns
nave_1 = 24
#
### Response: Question: The bakery has 440 in the morning and sells 90, sells 30 in the afternoon and 10 are returned by the grocery store. How many loaves of bread does the bakery have at the end of the day? Solution: def solution():
#The bakery had 440 to start with
loaves_start = 440
#They sold 90 in the morning
loaves_sold_morning = 90
#Sold 30 in the afternoon
loaves_sold_afternoon = 30
#The grocery store. 10 were returned
loaves_returned = 10
#The bakery ended up with this many loaves of bread
loaves_result = loaves_start - loaves_sold_morning - loaves_sold_afternoon + loaves_returned
#This is the final answer.
### Response: Question: The number of kids in a daycare facility is 20. A third of the kids are from 0-1 years old. Half of the rest are from 2-4 years old, and the rest are 5 years or older. How many kids in the daycare are 5 years or older? Solution: def solution():
#There are 20 kids in the daycare
kids_total = 20
#A third of the kids are from 0-1 years old
kids_age0_1 = kids_total / 3
#Half of the rest are 2-4 years old
kids_age2_4 = (kids_total - kids_age0_1) / 2
#The rest are 5 years or older
kids_age5_plus =
### Response: Question: In June, the rainfall in Sydney, Australia was 120mm. In July, it was 50mm and in August it was 100mm. On average, how much did it rain in a month in Sydney, Australia? Solution: def solution():
#It rained 120mm in June
june_rainfall = 120
#In July it rained 50mm
july_rainfall = 50
#In august it rained 100mm
august_rainfall = 100
#The total rainfall in the 3 months was