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-...
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...
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
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 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
6. Write a program in C programming (compile and run), a pseudocode, and draw a flowchart...
6. Write a program in C programming (compile and run), a pseudocode, and draw a flowchart for each of the following problems: a) Obtain three numbers from the keyboard, compute their product and display the result. b) Obtain two numbers from the keyboard, and determine and display which (if either) is the smaller of the two numbers. c) Obtain a series of positive numbers from the keyboard, and determine and display their average (with 4 decimal points). Assume that the...
Draw a structured flowchart or write pseudocode that describes the process of guessing a number between...
Draw a structured flowchart or write pseudocode that describes the process of guessing a number between 1 and 100. After each guess, the player is told that the guess is too high or too low. The process continues until the player guesses the correct number. Pick a number and have someone try to guess it by following your instructions. Submit the flowchart or pseudocode and the results of your test. Create a python program based on your flowchart or pseudocode....
Write an algorithm (flowchart OR Pseudocode) for the following problems: Take ten different numbers as input...
Write an algorithm (flowchart OR Pseudocode) for the following problems: Take ten different numbers as input and display the sum of there squares (SS). Example: let the inputs are: 3, 0, -1, 0, 9, -5, 6, 0, 2, 1 then 157 is displayed, because: SS=32+02+(-1)2+02+92+(-5)2+62+02+22+12=157 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...
Design the logic for a program that allows a user to enter 20 numbers, then displays...
Design the logic for a program that allows a user to enter 20 numbers, then displays them in the reverse order of entry. Design the logic for a program that allows a user to enter 20 numbers, then displays each number and its difference from the numeric average of the numbers entered. The program is C++. I need a Pseudocode
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT