Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people's questions, and connect with other people.

Have an account? Sign In

Captcha Click on image to update the captcha.

Have an account? Sign In Now

Sign In

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

Sorry, you do not have a permission to ask a question, You must login to ask question.

Forgot Password?

Need An Account, Sign Up Here
Tech Answered Logo Tech Answered Logo
Sign InSign Up

Tech Answered

Tech Answered Navigation

  • Home
  • Tutorials
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • About Us
  • Blog
  • Contact Us
Home / Questions /Q 2935
Next
In Process
Ramya
Ramya

Ramya

  • India
  • 2 Questions
  • 1 Answer
  • 0 Best Answers
  • 2 Points
View Profile
  • -1
Ramya
Asked: September 16, 20212021-09-16T08:40:05+05:30 2021-09-16T08:40:05+05:30In: Programming Related

Write a program to print the given input string three times in a single line separated by spaces in python

  • -1

How to print input string three times in python?

For suppose

input: Hello

output: Hello Hello Hello

write a program for string repeatationwrite a program to print given inputwrite a program to print input string in pythonwrite a program to print repeat the string in python
  • 5
  • 4,136
  • 0
  • 0
Answer
Share
  • Facebook

    Related Questions

    • How to Add, Install SSL Certificate to Your Website
    • What are some key considerations when designing a logo for a company that will be used online and in print?
    • Image Gallery With Animations Using HTML And CSS Code
    • How to backup android phone to pc before factory reset
    • What part does content play in SEO, and what impact does it have on search engine rankings?
    • code for matrix multiplication in c
    • How to add scrolling text in Blogger

    5 Answers

    1. Ramya

      Ramya

      • India
      • 2 Questions
      • 1 Answer
      • 0 Best Answers
      • 2 Points
      View Profile
      Ramya
      2021-09-16T14:50:17+05:30Added an answer on September 16, 2021 at 2:50 pm

      Here is the program to print the given input string three times in a single line separated by spaces in python. Before going to code this program, let understand what is meant by a string.

      A string is the sequence of Unicode characters wrapped inside single, double, or triple quotes. For example “123”, “Hello”,  etc…

      step -1::  we need to take the input from the user and store that in a particular variable.

      a = input()

      step-2:: Now we have to do string concatenation to print the particular string three times and store that concatenated string in a particular variable. for supposing let the variable is “b”,So

      b =  a+a+a

      step-3:: Now we have to separate each string with space. For that, we have to give space after every string in python. for that, we need to concatenate the space.

      b = a+” “+a+” “+a

      step-4::  Now print  “b”.

       

      Code:

      a = input()
      b = a + ” ” + a + ” ” + a
      print(b).

      • 2
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
    2. DEEPIKA
      2021-09-21T10:27:10+05:30Added an answer on September 21, 2021 at 10:27 am

      word=input()

      num=int(input())

      result=(word+(” “))*num

      print(result)

      • 1
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
    3. Donglee
      2022-07-11T21:15:24+05:30Added an answer on July 11, 2022 at 9:15 pm

      num = input()

      first_digit = num[0]

      second_digit =num[1]

      reversed_number = second_digit + first_digit

      print(reversed_number)

      • -1
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
    4. siva krishna
      2022-07-23T12:32:26+05:30Added an answer on July 23, 2022 at 12:32 pm

      Problem ; input:= Shiva

      Sol :=

      a = input()
      b = (a + ” “) * 3

      output:= Shiva Shiva Shiva

       

      • 0
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
    5. kalyan
      2024-06-11T10:46:42+05:30Added an answer on June 11, 2024 at 10:46 am

      a = input()
      print(a +” “+ a+” “+ a)

       

      • 0
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
    Leave an answer

    Leave an answer
    Cancel reply

    Browse

    Sidebar

    Ask A Question

    More Questions

    • arunraj503

      How to Add, Install SSL Certificate to Your Website

    • EmmaScott

      What are some key considerations when designing a logo for

    • dynamicapps5

      Image Gallery With Animations Using HTML And CSS Code

    • arunraj503

      How to backup android phone to pc before factory reset

    • SEO_BRISK

      What part does content play in SEO, and what impact

    • glenn

      code for matrix multiplication in c

    • sita

      How to add scrolling text in Blogger

    • dynamicapps5

      how to solve error illegal start of expression in java

    Stats

    • Questions 1,992
    • Answers 2,102
    • Posts 12
    • Best Answers 73

    Related Questions

    • arunraj503

      How to Add, Install SSL Certificate to Your Website

    • EmmaScott

      What are some key considerations when designing a logo for a company

    • dynamicapps5

      Image Gallery With Animations Using HTML And CSS Code

    • arunraj503

      How to backup android phone to pc before factory reset

    • SEO_BRISK

      What part does content play in SEO, and what impact does it

    • glenn

      code for matrix multiplication in c

    • sita

      How to add scrolling text in Blogger

    • dynamicapps5

      how to solve error illegal start of expression in java

    Explore

    • Home
    • Communities
    • Questions
      • New Questions
      • Trending Questions
      • Must read Questions
      • Hot Questions
    • Polls
    • Tags
    • Badges
    • Users
    • Help

    Footer

    Recent Comments

    • muller on how to solve export problem in kinemaster
    • muller on how to solve export problem in kinemaster
    • muller on how to solve export problem in kinemaster
    • AaronBlackburn on why can’t i find my message requests on instagram
    • shree on How to use philips citrus press juicer 25 watts Demo
    Ask A Question

    Archives

    Tags

    laptop buying guide (1) limit google news notifications (1) printer buying guide (1) stop google news notifications (1) turn off google news notifications (1)

    Social media

    © 2023 @ Techanswered.com.
    Terms, Privacy policy & Sitemap.

    Insert/edit link

    Enter the destination URL

    Or link to existing content

      No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.