# Computer Science/Pseudo Code Python

Hi, I'm confused about an assignment. I'm not sure what to do and would like some help.

An example:
Write a program that obtains two integer numbers from the user.

It will print out the sum of those numbers.

Pseudo code:

Prompt user to enter first integer number

Validate user entry is an integer number

If Not an Integer entry, ask user to reenter first integer number

Prompt user to enter second integer number

Validate user entry is an integer number

If Not an Integer entry, ask user to reenter second integer number

Compute sum by adding first integer to second integer number

Display sum of two integer numbers as final result

In this project, create the pseudo code from the following request.

The Pseudo Code must have some sort of menu that allows users to make selections to do a particular calculation such as addition, multiplication, and subtraction
It must provide five menu items that allow the user to make a calculation. Each of the 5 menu items should perform different calculations such as addition, multiplication, and subtraction. There should be an additional menu item for user to exit the program. So, total of 6 menu item.
The Pseudo Code must allow user to enter valid number entries to perform selected calculation option
Once the user selects a menu item, Pseudo Code should perform user entries, calculation, display the result to the user, and return to the main menu. User should be presented with main menu until they choose option to exit the program.

Please note that this is not a programming assignment. Please do not submit working program as part of the project.

How do I begin?

1. 👍 0
2. 👎 0
3. 👁 257

1. 👍 0
2. 👎 0
posted by ronald
2. okay so start off the program with a menu pattern.

create an int or char called menuchoice
Have variables (int or char) from 1-6 or A-F as your menu option

After you coded your menu, let your user enter their 2 numbers. So create 2 for int variables (num1,num2).

now either use if,then statements or switch-case.

num1 + num2}
};

else if (menuchoice == 2) {
num1 - num2;
};
--------
keep going until all conditions are coded.
Since he wants you to display the menu again after a condition is done, put all the if-else or switch-case in a do while loop.
do {
[code]
} while false

[code to quit program]
};

-everything should be in the do while loop except all your variables
-while loop could be used as well
Note: never learned syntax for python but this is the rough layout of what your program should look like.

hope this helps :^)

1. 👍 0
2. 👎 0
posted by AJ

## Similar Questions

1. ### Behavioral Science

I have a assignment du and kind of confused after reading the text the assignment is write 700- to 1,050-word essay in which you compare and contrast the influence of heredity and hormones on human behavior. I am not sure exactily

asked by TINA on March 3, 2008
2. ### English/Film and Media studies

Hi My assignment is to talk about a documentary that doesn't exist. We had to pretend to create one and one of the things we need to discuss is our shot construction so everything from lighting, location to shot sizes. Then we

asked by Em on July 19, 2011
3. ### CIS 105

I need help with the following assignment: o Distinguish between computer data represented by the state of a computer’s electrical switches and the meaningful information that is displayed to the user. I have read the course

asked by Paul on July 25, 2010
4. ### hca 240

•Writing Assignment: prepare for this assignment by reading Chapter 8 Read all three scenarios and identify which blood disorder they are at risk for by including their symptoms, lifestyle, and family history.•Post your

asked by bobbi on October 25, 2009
5. ### Literature Question

I have this question on a homework assignment and I am confused! It is not wise to rely on the__________ to determine whether a stereotype exsists in a book. (Here are the choices the assignment gives me to complete the sentence)

asked by Rachel on February 4, 2007
1. ### COM 215

Your manager at work has advised you that you and two of your coworkers will be visiting a branch of your company in another country. Select a country that you would like to learn more about. Then, conduct an Internet or library

asked by Anonymous on November 27, 2007
2. ### help!

I have an assignment for tomorrow and I am completely confused. What are the techniques needed for an essay?

asked by an on January 9, 2018
3. ### Social Studies

I have an assignment that im retaking and it's to find a current news article that takes place in an ancient land. The assignment says to choose a current news story about iraq, egypt isreal or palestine. And I have to write a 5

asked by (Not telling) on January 10, 2017
4. ### English

In your own opinion 1. How do objectives assist a student in completing the assignment? 2. Describe what needs to be done for the assignment found in a sample syllabus? 3. If you were to complete the assignment found in a sample

asked by Anonymous on June 17, 2018
5. ### HCA/230

Hello, I am confused on my assignment I have to do. It states to make a list on perspectives of caregivers. Can you explain this better for me? Is this what they do? Anything info will help me on this one. Thanks,

asked by Nikol on April 19, 2011
6. ### Writing--Plz Help!!

I am confused with this question that I have on a homework assignment. When developing a written plan, a technique in which the writer includes every detail as it occurs is called: 1. writing a rough draft 2. outlining 3.

asked by Kathryn on December 5, 2006

More Similar Questions