+ 2

Why is the following code not going through test result. 4/5 test fail

Write a program that outputs the sum of two integers input 6 3 output 9 print( int(6) + int(3) )

23rd Aug 2020, 4:27 PM
Abraham Zimba
Abraham Zimba - avatar
9 Antworten
+ 2
shouldn't you use variables in place of numbers in int() parts? could you show us the full code or the error part?
23rd Aug 2020, 4:30 PM
Rellot's screwdriver
Rellot's screwdriver - avatar
+ 2
that link redirects me to the coach code challenge.not to your own code.
23rd Aug 2020, 4:36 PM
Rellot's screwdriver
Rellot's screwdriver - avatar
+ 2
writing this fixed code according to what code you've have show us here. a = input() b = input() print( int(a) + int(b) ) hope this might help
23rd Aug 2020, 4:38 PM
Rellot's screwdriver
Rellot's screwdriver - avatar
+ 2
why are you putting integers in input() part? it doesn't make any sense
23rd Aug 2020, 5:02 PM
Rellot's screwdriver
Rellot's screwdriver - avatar
+ 2
# Abraham Zimba all are the same. a=input() b=input() print( int(a) + int(b)) # OR # a=int(input()) b=int(input()) print(a+b) # OR # print(int(input()) + int(input()))
23rd Aug 2020, 5:03 PM
RKK
RKK - avatar
+ 2
x=6 y= 3 z=x+y print (z) 🤔
24th Aug 2020, 11:00 AM
Sanjay Kamath
Sanjay Kamath - avatar
+ 1
Use variables instead of numbers...XD👅
25th Aug 2020, 6:16 AM
Adarsh Thakur
Adarsh Thakur - avatar
23rd Aug 2020, 4:32 PM
Abraham Zimba
Abraham Zimba - avatar
0
Thanks for the help
23rd Aug 2020, 5:08 PM
Abraham Zimba
Abraham Zimba - avatar