Question

In: Computer Science

Draw a flowchart and pseudocode that accepts three numbers from a user and displays a message...

Draw a flowchart and pseudocode that accepts three numbers from a user and displays a message if the sum of any two numbers equals the third.

Make a working version of this program in Python.

Solutions

Expert Solution

Dear Student ,

As per the requirement submitted above , kindly find the below solution.

Flow chart :

Demonstration :

Here a new python program with name "main.py" is created, which contains following code.

main.py :

#asking user to enter number1
number1=int(input("Enter first number:"))
#asking second number
number2=int(input("Enter second number:"))
#asking third number
number3=int(input("Enter third number:"))
#checking sum of any two number with third one
if((number1+number2)==number3):
#if sum of number1 and number2 are equal to number3 then
print("sum of "+str(number1)+" and "+str(number2)+" are equal to "+str(number3))
elif((number2+number3)==number1):
#if sum of number3 and number2 are equal to number1 then
print("sum of "+str(number2)+" and "+str(number3)+" are equal to "+str(number1))
elif((number1+number3)==number2):
#if sum of number1 and number3 are equal to number2 then
print("sum of "+str(number1)+" and "+str(number3)+" are equal to "+str(number2))
else:
print("sum of any two numbers are not equal to third one")

======================================================

Output : Compile and Run main.py to get the screen as shown below

Screen 1 :main.py, screen when sum of any two number is not equal to third one

Screen 1 :main.py, screen when sum of any two number is equal to third one

NOTE : PLEASE FEEL FREE TO PROVIDE FEEDBACK ABOUT THE SOLUTION.


Related Solutions

6-Write a module in pseudocode called magicSix(), which accepts two integers and displays a message “Magic...
6-Write a module in pseudocode called magicSix(), which accepts two integers and displays a message “Magic 6!” if either of the two integers is a 6 or if their sum or difference is a 6. Otherwise, the program will display “Not a magic 6.” Note, you will need to determine the larger number when calculating the difference, to get a positive difference. You cannot use any built-in Python functions to do this. Type your pseudocode into your answer document. 7-...
Draw a flowchart that asks the user to enter an array of random numbers, then sorts...
Draw a flowchart that asks the user to enter an array of random numbers, then sorts the numbers (ascending order), then prints the new array, after that asks the user for two new numbers and adds them to the same array and keeps the array organization.
7/Draw a flowchart that asks the user to enter an array of random numbers, then sorts...
7/Draw a flowchart that asks the user to enter an array of random numbers, then sorts the numbers (descending order), after that reverses it (the first element will be the last...).
The program asks user to enter three integers, and the displays a message indicating whether the...
The program asks user to enter three integers, and the displays a message indicating whether the numbers are in sequential order, in reverse order or in neither order. Find the errors and correct the program codes in the if comparison expressions. (10 points) 1.     using System; 2.     using static System.Console; 3. 4.     class Sorting 5.     { 6.              static void Main() 7.              { 8.                       int num1, num2, num3; 9.                       string snum1, snum2, snum3; 10.                    Write ("Enter first number "); 11.                    snum1...
Design a program using a flowchart or pseudocode that accepts a person’s loyalty card number and...
Design a program using a flowchart or pseudocode that accepts a person’s loyalty card number and amount spent in the store last month. Display the data only if the customer is a high spender – a person who spent more than $1000 in the store. A program that accepts customer info continuously until a sentinel value is entered and displays a list of high spenders.
Write an algorithm (flowchart OR Pseudocode) for the following problem Take input character from the user...
Write an algorithm (flowchart OR Pseudocode) for the following problem Take input character from the user unless he enters '$'. Thereafter display how may vowels were entered by the user. Also display the number of each vowel ('a', 'e', 'i', 'o' and 'u') separately. For example if the user enters B a b e c o o d i u g o a l $ Then we have the output below: #A=2 #E=1 #I=1 #O=3 #U=2
Write a C++ program that asks the user to enter in three numbers and displays the...
Write a C++ program that asks the user to enter in three numbers and displays the numbers in ascending order. If the three numbers are all the same the program should tell the user that all the numbers are equal and exits the program. Be sure to think about all the possible cases of three numbers. Be sure to test all possible paths. Sample Runs: NOTE: not all possible runs are shown below. Sample Run 1 Welcome to the order...
-Draw a flowchart and pseudocode for a program that produces a monthly bill for a cell...
-Draw a flowchart and pseudocode for a program that produces a monthly bill for a cell phone customer. -List at least 10 separate modules that might be included. - For example, one module might calculate the charge for daytime phone minutes used. - -Make a working version of this program using Python. Need all of the above answered including the correct code for program using python
i could use the flowchart and pseudocode solutions for the following: 1.       1.  Draw a structured flowchart describing...
i could use the flowchart and pseudocode solutions for the following: 1.       1.  Draw a structured flowchart describing the steps you would take to bake pancakes in a pan.  Include at least one decision. 2.       2.  Create the pseudocode to go along with the flowchart created in question above.
Lab 1 – Numbers in Descending Order Design an application that accepts 10 numbers and displays...
Lab 1 – Numbers in Descending Order Design an application that accepts 10 numbers and displays them in descending order For the programming problem, create the pseudocode and enter it below. Enter pseudocode here
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT