Computer science work?
Hi, I'm currently working on a computer science thesis and I'm completely desperate about this task. It would be very nice if someone could help me 🙂
Write a function that divides two numbers. Add the required lines of code that read two variables and call the function to divide them. Print the result. Write the appropriate Python/pseudocode.
Thanks
That's what I'd do. In particular, check whether the second number is 0 because we otherwise throw an exception.
can you write me the pseudocode? thank you 😉
Didn't write a pseudocode forever. You may look like this or something similar:
really 1000 thanks you run my ass
should fit
cus
no ding
can you write me the pseudocode? thank you 😉
Jo here, I hope that’s what you meant
Function divide_numbers(a,b):
if b is 0:
return “Bug: Division by Zero!”
Other:
give a divided by b back
Main program:
Input num1
Input num2
result = divide_numbers(num1, num2)
“The result of the division is:” result