ubuntu2204
Assignment 1
Assign the integer 5 to the variable a. Assign the integer 7 to variable b. Now interchange the values of a and b, without using numbers.
Write the code to find out if a variable x is odd or even and then to print "Even number" or "Odd number" based on value of x.
The rule of divisibility by 3 is that the sum of the digits should be divisible by 3. The rule of divisibility by 4 is that the last two digits are divisible by 4. Write code to check if a 3 digit number is divisible by 4 and 3 only using the rules of divisibility.
With only the numbers 10 and 2, use mathematical and string operations to end up with the number 5540.
Without running this code, tell us what the output will be (you can run it after submitting the answer!):
x = 5
y = x + 3
y = int(str(y) + "2")
print(y)
Write the answer for Exercise 5 here: 82