Description

Q1. What will be the output after the following statement? x = 6 y = 3 print(x/y)

x = 6
y = 3
print(x/y)

Output:

2.0

Q2. What will be the output after the following statement? x = 8 y = 2 print(x%y)

x = 8
y = 2
print(x//y)

Output:

4

Q3. What will be the output after the following statements? x = 5 y =4 print(x%y)

x = 5
y = 4
print(x % y)

Output:

1

Q4. What will be the output after the following statement? x = 3 y = 2 x +=y print(x)

x = 3
y = 2
x += y
print(x)

Output:

5

Q5. What will be the output after the following statement? x = 5 x = 7 x *= y print(x)

x = 5
y = 7
x *= y
print(x)

Output:

35

Q6. What will be the output after the following statements? x = 30 y = 7 x %= y print(x)

x = 30
y = 7
x %= y
print(x)

Output:

2

Comments

Login is mandatory to comment Please login

Recommended Posts

Sets in Python | Perform Set methods

A Set is an unordered collection data type which does not contain duplicates elements. A set is iterable and mutable data type.

Conditional Statement If elif else statement in Python

Like some situation comes in our real life in which we have to take some decision as to what we have to do next.

Everything about of Loops in Python | For loop | While loop | Nested Loop

A loop is used for iterate the sequence. It is used to iterate List, String, Dictionary, Tuple. Iterating over a sequence is called traversal.

Function | Docstring | Lambda | Kwargs in Python

In Python programming, a function is a block of statements that makes our code readable. If we do that function in the program, then we do not have to write the same statement of code again and again.

What is Python? How Python is interpreted? What are the tools that help to find bugs or perform static analysis? What are Python Decorators?

Python Program is a gerneral purpose of high level, intereted, interative and object-oriented scription programming language developed by Guido Van Rossum in  1991.