Define a function that can convert an integer into a string and print it in the console

Question:

Define a function that can convert an integer into a string and print it in the console.

Hints:

  • Use str() to convert a number to a string.

Solution:

def printValue(n):
	print str(n)

printValue(3)
Code language: Python (python)

Leave a Comment