Computer Science, asked by omeir59051, 2 months ago

What will be the result of the following Python statement:
type(5/7)

Answers

Answered by Anonymous
5

Predicting result - Python

Before we predict the output of the given Program, let's first know about that what is Python and what is programming.

What is Python?

Python is a powerful high-level, object-oriented programming language. It was created by Guido van Rossum. It was launched on 1991. It can connect to the database system, it can also read and modify files. Python works on different platforms like, Raspberry Pi, Linux, Mac, Windows and many more platforms.

What is Programming?

Programming means to create or develop a software which is called a program that contains the instructions to tell a computer what to do.

\rule{80mm}{1pt}%

The Output

The output of the given python program will be as follows:

<class 'float'>

The type() method is used to return the type of the variable given as input.

For example we can use it to check if the argument of a function what is needed. Let's say our function needs an integer, then we could ask:

>>> print(type(5))

Then the output of the given program will be as follows:

<class 'int'>

Answered by juwairiyahimran18
0

Predicting result - Python

Before we predict the output of the given Program, let's first know about that what is Python and what is programming.

What is Python ?

Python is a powerful high-level, object-oriented programming language. It was created by Guido van Rossum. It was launched on 1991. It can connect to the database system, it can also read and modify files. Python works on different platforms like, Raspberry Pi, Linux, Mac, Windows and many more platforms.

What is Programming ?

Programming means to create or develop a software which is called a program that contains the instructions to tell a computer what to do.

\rule{80mm}{1pt}%

The Output

The output of the given python program will be as follows:

<class 'float'>

The type() method is used to return the type of the variable given as input.

For example we can use it to check if the argument of a function what is needed. Let's say our function needs an integer, then we could ask:

>>> print(type(5))

Then the output of the given program will be as follows:

<class 'int'>

Similar questions