Hi, for the simple calculator project in python, I only get 1 case, the second case how do I get it?
A = 2; F = 7; print (A+F); D = 11;, E = 22; T = (D+E); print(T)
# How about this way. def add(first, second): return first + second #add two numbers #Enter first number first = int(input()) #Enter second number second = int(input()) sum = first + second print(sum) # this might work.
Hi! in this kind of tasks, you don't need to insert values directly. leave it to the test program. imagine that you were asked to write a program to calculate two unknown numbers. how would you write it?
# another way you could do this. def add_numbers(a, f): total = a + f return total print(add_numbers(2, 7)) def add_sum_numbers(d, e): t = d+e total = t return total print(add_sum_numbers(11, 22)) # did this help?
it won't help, as you don't understand. these are assignments-projects that complete each module of the course. there you need to pass verification tests. users try to substitute direct values in the input data. although you need to do exactly the opposite. imagine that you need to write a calculator program where the input data is unknown to you. you need to perform actions on two unknown numbers!
I get out of an exit apart from the first one. Because I get one after another, do you need to come out the second apart from the other, like separating them?
I want one operation to come out apart from the other in the middle, how would I jump to take the second operation later?
yes, this option is suitable, but you have an extra add function, you do not call it anywhere in your program
Its made by me in c
help my code does not iterate
What's wrong with this??
How to install and update ?