My issue
My code
print ("3+4) "and" (2+1")
print ((7,:"and", 3))
Learning course: Learn Python
Problem Link: CodeChef: Practical coding for everyone
print ("3+4) "and" (2+1")
print ((7,:"and", 3))
Learning course: Learn Python
Problem Link: CodeChef: Practical coding for everyone
The question states that we have to directly print results for β3+4β and β2+1β. The desired solution should be print(7, βandβ, 3) .
In your case, the first code , the second line is almost correct, although why is there is semicolon after first comma?
The first code seems all wrong. It would have printed (3+4) as a string, not calculated the values as integers if you intended to write it like;
print(β3+4β,βandβ,β2+1β).