Are the two fragments logically equivalent? Why or why not?
Q. Consider the following two fragments: if x == 5 : x = x + 1 else: x …
Q. Consider the following two fragments: if x == 5 : x = x + 1 else: x …
Q. Consider the following code: x = int (input ("Enter the value of 'x…
Q. What is the output of the program? score = 40 while score > 1: score …
Q. What is the output of the following program ? x = 7 y = 8 if x < 7 or x &…
Q. What is the output of the following python program? First try and predict th…
Q. Given the following Boolean variables, what would be the output of the follo…
Q. What would be the output of the following? x = True y = False z = False prin…
Q. What would be the output of the following? (a) print(type([1,2])) (b) print(…
Q. What would be the output produced by the print statements given below? impor…
Q. Which of the following statements would yield 2? Assume that math module is …
Q. What would be the output of following code? Support your answer with reasons…
Q. What would be the output of following code? a = 9000 # initializes and assig…
Q. What does Python print as it executes the following sequence of statements? …
Q. In each of the following Python expressions or statements, indicate what dat…
Q. What would be the output of following code? print ('doesn\'t') p…
Q. While taking input from input(), you need to convert the input into float an…
Q. In each of the following parts there is an error in the Python code. Identif…
Q. Give three examples of legal variable names and two examples of illegal vari…
Q. For each of the following, write a single (that is, one) Python statement: (…
Q. Write a program to print a square multiplication table as shown below: 1 …