Skip to content

Latest commit

 

History

History
21 lines (16 loc) · 627 Bytes

File metadata and controls

21 lines (16 loc) · 627 Bytes

Datatypes-Read and Print a String in Python

🎯 Aim

To write a Python program to read a string from the user and then print it.

🧠 Algorithm

  1. Assign a variable named men_stepped_on_the_moon.
  2. Use input() to read a string from the user and store it in the variable.
  3. Print the value stored in the variable.

🧾 Program

men_stepped_on_the_moon=input()
print(men_stepped_on_the_moon)

Output

image

Result

Thus,the Python program to read a string from the user and then print it is created successfully.