The document contains questions about Python programming concepts and syntax. It asks the user to:
1) Explain the difference between division and floor division operators, and exponent operators in Python.
2) Evaluate an expression involving order of operations.
3) Write a program to check voter eligibility based on age input.
4) Find the maximum of 3 numbers using nested if/else statements.
The document contains questions about Python programming concepts and syntax. It asks the user to:
1) Explain the difference between division and floor division operators, and exponent operators in Python.
2) Evaluate an expression involving order of operations.
3) Write a program to check voter eligibility based on age input.
4) Find the maximum of 3 numbers using nested if/else statements.
The document contains questions about Python programming concepts and syntax. It asks the user to:
1) Explain the difference between division and floor division operators, and exponent operators in Python.
2) Evaluate an expression involving order of operations.
3) Write a program to check voter eligibility based on age input.
4) Find the maximum of 3 numbers using nested if/else statements.
1. What is difference between / and //, * and ** operators?
2. Evaluate the following expression with precedence of operator:
a. X = 2* 3/ 5 + 10 //3 - 1 3. Explain if…else statement with the help of an example. 4. Write statement in Python to find absolute value of -100. 5. Write a program to find maximum of 3 numbers using nested if..else statement. 6. Write a program to input values for Principle, rate and Time and calculate compound interest. 7. Write a program to input age of a person and print message “Eligible to Vote” if age is more a. than 18 otherwise print message “not eligible to Vote”. 8. Write a program to check whether the entered number by user is even or odd. 9. Find the output: i. x, y =10, 15 ii. if (x >= y): iii. z = x + y iv. else: v. z = x -y b. z = z ** 2 c. print “result =“, z 10. Rewrite the following program after finding and correcting syntactical errors and underlining it. a, b = 0 if (a = b) a +b = c print z 11. What will be the output of the following code: i. A = 3 – 4 + 10 ii. B = 5 * 6 iii. C = 7.0/2.0 iv. D = “Hello” * 3 v. print “Value are :“, A. B, C, D 12. Write a program that takes name of student, marks (out of 100) of 3 subjects from user and calculate total marks, percentage and grade as per the following criteria: i. percentage Grade 1. >=75 A ii. >=60 and <75 B iii. <60 C 13. Rewrite the code after removing error. 250 = Number WHILE Number<=1000: if Number=>750: print Number Number=Number+100 else print Number*2 Number=Number+50 14. How many times the loop will execute? i=4 while(i<25): print i i+=4