Lab Test Sample Questions Set I
Lab Test Sample Questions Set I
2. Create a variable x with value 5. Double its value and print the result.
3. Convert the integer 100 into a string and print its type.
4. Write a Python program to check if a number entered by the user is
even or odd.
6. Write a Python script to compare three numbers and print the largest
one.
7. Write a for loop to calculate the sum of numbers from 1 to 50.
12. Write a Python script to calculate the sum of all even numbers
between 1 and 20 using a while loop.