Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Programming Assignment Create Pseudocode or a Flow Chart Hello, I would like to see some ideas on a nice flow or pseudocode. Easy assignment but

Programming Assignment Create Pseudocode or a Flow Chart

Hello, I would like to see some ideas on a nice flow or pseudocode. Easy assignment but time consuming. Usually my flow charts aren't very creative. I would like to see how others would design a flow or write pseudocode. I have zero experienc writing pseudocode and only have done flow charts. It would be nice to see an example of pseudocode. Thank you! Here is the program itself...

# function to compare a and b def compare(a,b):

# if a is greater than b , return 1 if a > b: return 1

# if a and b are equal, return 0 elif a == b: return 0

# if a less than b , return -1 elif a < b : return -1

# testing if __name__=="__main__":

# calling the compare function with a and b print('compare(5,2) %d'%compare(5,2)) print('compare(2,5) %d'%compare(2,5)) print('compare(3,3) %d'%compare(3,3))

# getting values for a and b a=int(input("Enter the value for a: ")) b=int(input("Enter the value for b: "))

print('compare(%d,%d) %d'%(a,b,compare(a,b)))

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Flash XML Applications Use AS2 And AS3 To Create Photo Galleries Menus And Databases

Authors: Joachim Schnier

1st Edition

0240809173, 978-0240809175

More Books

Students also viewed these Databases questions

Question

In an Excel Pivot Table, how is a Fact/Measure Column repeated?

Answered: 1 week ago