Computer Science, asked by user123442, 7 months ago

If a is of type int and b is of type float what would be the resultant data type of a+b
a.int
b. float
c.double
d. short

Answers

Answered by dhriti21
14

Answer:

double

Explanation:

mark as BRAINLIEST

Answered by amanpanday2811
1

Answer:

Double

Explanation:

Integers are numbers without a decimal point, whereas floats are numbers with a decimal point. This is am important distinction that you MUST remember, especially when working with data imported from and exported to Excel.

As digital humanists, you might be thinking to yourself, “I just work with text, why should I care so much about numbers?” The answer? Numbers allow us to form quantitative analysis. What if you want to know the times a specific author wrote to a colleague or to which places he wrote most frequently, as was the case with the Republic of Letters project at Stanford? In order to perform that kind of analysis, you MUST have a command of how numbers work in Python, how to perform basic mathematical functions on those numbers, and how to interact with them. Further, numbers are essential to understand for performing more advanced functions in Python, such as Loops, explored in Lesson 09.

The way in which you create a number object in Python is the to create an object name, use the equal sign and type the number. If your number has a decimal, Python will automatically consider it a float. If it does not, it will automatically consider it an integer.

Examples of integer and float:

an_int = 1

a_float = 1.1

If we want to change a float to an integer, we can do so using the int() function. When we do this, the float will lose its decimal and the numbers behind the decimal place. We can similarly change an integer to a float using the float() function. In this case, the integer will receive a .0 at the end. In some instances, you may need to convert an integer or a float to a string. This is particularly useful when you are trying to create files based on the number of iterations in a loop. I will explain this process in future lessons, but for now, you should know how to do it. To do this, you use the str() function. In all of these cases, these functions take a single argument, the item that you want to convert.

For more refers to-

https://brainly.in/question/7697308?referrer=searchResults

https://brainly.in/question/27047543?referrer=searchResults

#SPJ2

Similar questions