24 Oct 2022

Posted on:

24 Oct 2022

0

# Resolved:practice 6-line 109

Is it necessary to write line 109 in the last exercise? Because I did it without typing the line, and it worked.

Posted on:

24 Oct 2022

0

Hey Arsalan,

Line 109 is the one that swaps the two integers, so it is essential for solving the exercise. How come your solution works without including this line? Could you maybe share your code?

Kind regards,
365 Hristina

Posted on:

24 Oct 2022

0

integer_1=int(input('tell me integer number one  \n>>>>'))
integer_2=int(input('great!Now tell me the second number'))
print('before swapping integer_1=',integer_1,'and interger_2=',integer_2)
print('However after swapping, interger_1=',integer_2,'and integer_2=' ,integer_1)

Posted on:

24 Oct 2022

0

Hey again Arsalan,

Thank you for sharing your code!

The purpose of the exercise is to swap the values of `integer_1` and `integer_2`. That is, if before the swapping the values are

``````integer_1 = 10
integer_2 = 20
``````

then after the swapping, they should instead be:

``````integer_1 = 20
integer_2 = 10
``````

Therefore, your last `print`-statement should read

``````print('However after swapping, interger_1=',integer_2,'and integer_2=' ,integer_1)
``````

Kind regards,
365 Hristina