About Printing - About types

3 important questions on About Printing - About types

What function can be used to find out what the type is of a given variable?

type()

Is it possible to combine floats and integers in the same function?

Yes

What do you need to do when you want to use the + on a string and an integer? How is this way called? And is there also another way to do this?

You need to convert the integer into an string. This can be done by using str(). This is called casting.

There is another way to do this. This can ben done by the use of f-strings. Numbers are converted to strings automatically in this way.

The question on the page originate from the summary of the following study material:

  • A unique study and practice tool
  • Never study anything twice again
  • Get the grades you hope for
  • 100% sure, 100% understanding
Remember faster, study better. Scientifically proven.
Trustpilot Logo