livepython.net

3. Python Program to Print a String and a Number Together

Easyprint() basics

Overview

This task introduces combining a string and a number in a single print statement. You will gain hands-on experience with Python's print() function and learn how to output multiple elements of different data types together.

Problem Statement

Write a Python program that prints a string and a number together in one single line. The desired output is:

I am 25 years old

But here’s the catch:
You must use the comma (,) inside the print() function to combine the string and the number. Don’t put the whole sentence inside a single string.

Input

  • No input is required.

Output

The program should output the exact sentence:

I am 25 years old

Learn this firstChapter 2 · Python print() Function: Show Text and Numbers
solution.py
# write your code here

EXPECTED OUTPUT

1I am 25 years old

YOUR OUTPUT

Press Run to see your output here. Lines are compared with the expected output.