Question
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started