Menu

Sign in to track your progress and unlock all features.

Theme style

Log in

Full lesson preview

Convert Integer to String

Turn an integer into its string representation.

Python practice16 minVariables & Data TypesIntermediateLast updated January 2, 2026

Problem statement

Given an integer, return its string representation. The function should work for positive, zero, and negative integers. Do not add extra whitespace or formatting — just convert using standard string conversion.

Task

Create a function that returns the string form of an integer using Python's conversion.

Examples

Positive integer

Input

convert_int_to_str(42)

Output

"42"

The integer 42 becomes the string "42".

Input format

A single integer is passed as the only argument to convert_int_to_str.

Output format

Return the string representation of the integer.

Constraints

- Use Python's built-in conversion; do not implement manual digit assembly. - Input will be a valid integer.

Samples

Sample 1

Input

convert_int_to_str(-7)

Output

"-7"

Negative numbers keep the minus sign in the string.