+ 2

Help. Write a python program that will ask the user to type in a word.  The program should then print out that word with asteric

Enter a word: Bob Bob ***

28th Mar 2020, 2:24 PM
Cameron Mason
Cameron Mason - avatar
22 Answers
+ 6
Cameron Mason I can understand that, so I am helping you to create your first program. x = input("Enter Some Text:") print(x) print("*" * len(x)) At the first line, taking an input. At second line, the text will be printed which was taken as an input at third line, I have taken asterisk(*) in double quotes, so that it is treated as a string, like this "*". After that, there is one more asterisk which is for multiplication with the length of the input. len() stands for length.
28th Mar 2020, 3:16 PM
Taranjeet
Taranjeet - avatar
+ 5
Please show us your attempt first. We're not here to do your homework for you and it won't help you in the long run if we do.
28th Mar 2020, 2:26 PM
Russ
Russ - avatar
+ 3
I'm sorry for troubling y'all it's just said this is my first time coding and I don't know too much how to do coding
28th Mar 2020, 3:01 PM
Cameron Mason
Cameron Mason - avatar
+ 2
Thank you. So my major at utmartin is computer science. I will do better next time
28th Mar 2020, 3:18 PM
Cameron Mason
Cameron Mason - avatar
+ 1
Kindly first try yourself and than ask about your confusion in code. Similar question might be helpful for you.go through the answers helpful for you https://www.sololearn.com/Discuss/2217355/?ref=app
28th Mar 2020, 2:27 PM
Muhammad Bilal
Muhammad Bilal - avatar
+ 1
Muhammad Bilal It's the same guy! 😆
28th Mar 2020, 2:28 PM
Russ
Russ - avatar
+ 1
I met to put my answer. I just forgot
28th Mar 2020, 2:29 PM
Cameron Mason
Cameron Mason - avatar
+ 1
I don't know
28th Mar 2020, 2:32 PM
Cameron Mason
Cameron Mason - avatar
+ 1
How do I do that, this is actually fascinating to learn
28th Mar 2020, 2:53 PM
Cameron Mason
Cameron Mason - avatar
+ 1
Just leave it here :-)
29th Mar 2020, 12:19 PM
Dev8ps
+ 1
word=input("Enter a word") print(word) l=len(word) print("*" * l)
30th Mar 2020, 7:03 AM
Sinjini Dutta
Sinjini Dutta - avatar
0
Russ 😀😀 Cameron Mason Please try yourself
28th Mar 2020, 2:30 PM
Muhammad Bilal
Muhammad Bilal - avatar
0
Cameron Mason So you've taken the input and saved it to a variable called 'word'. What do you think you might need to do next?
28th Mar 2020, 2:31 PM
Russ
Russ - avatar
0
Cameron Mason What if user enter an input having more characters than bob. Does your code work fine??
28th Mar 2020, 2:33 PM
Muhammad Bilal
Muhammad Bilal - avatar
0
The first thing you want to do is print what the user entered, right?
28th Mar 2020, 2:33 PM
Russ
Russ - avatar
0
If you understand that one you can write a program that input a string and print "#=" corresponding to each character of input Test input: Book Output: #=#=#=#= https://code.sololearn.com/cxooIxftw7TC/?ref=app
28th Mar 2020, 2:59 PM
Muhammad Bilal
Muhammad Bilal - avatar
0
I can help you, if you want solve it with C programming
29th Mar 2020, 7:39 PM
[No Name]
0
Taranjeet but it'll replace asteric for blank space too in your code
30th Mar 2020, 4:30 AM
Vignesh
Vignesh - avatar
0
Vignesh Vicky He said a word, not a sentence. So there would be no spaces.
30th Mar 2020, 4:39 AM
Taranjeet
Taranjeet - avatar
0
Taranjeet I said that for your example given,not for what he asked bro
30th Mar 2020, 4:52 AM
Vignesh
Vignesh - avatar