Problem: Write an Adder interpreter, that prompts for and executes an Adder script. For example if the file Children. ad contains: input sons input daughters children gets sons children adds daughters print children quit The interpreter would run like this Script name: children.ad Enter a value for sons: 3 Enter a value for daughters: 4 children equals 7 Hint: This should involve a few small modifications to your REPL.

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter8: Advanced Method Concepts
Section: Chapter Questions
Problem 8RQ
icon
Related questions
Topic Video
Question

write this program in python

 
Problem: Write an Adder interpreter, that prompts for and executes an Adder script. For
example if the file Children. ad contains:
input sons
input daughters
children gets sons
children adds daughters
print children
quit
The interpreter would run like this
Script name: children. ad
Enter a value for sons: 3
Enter a value for daughters: 4
children equals 7
Hint: This should involve a few small modifications to your REPL.
Transcribed Image Text:Problem: Write an Adder interpreter, that prompts for and executes an Adder script. For example if the file Children. ad contains: input sons input daughters children gets sons children adds daughters print children quit The interpreter would run like this Script name: children. ad Enter a value for sons: 3 Enter a value for daughters: 4 children equals 7 Hint: This should involve a few small modifications to your REPL.
Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Instruction Format
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,