+ 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 ***
22 Antworten
+ 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.
+ 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.
+ 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
+ 2
Thank you. So my major at utmartin is computer science. I will do better next time
+ 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
+ 1
Muhammad Bilal It's the same guy! 😆
+ 1
I met to put my answer. I just forgot
+ 1
I don't know
+ 1
How do I do that, this is actually fascinating to learn
+ 1
Just leave it here :-)
+ 1
word=input("Enter a word")
print(word)
l=len(word)
print("*" * l)
0
Russ 😀😀
Cameron Mason
Please try yourself
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?
0
Cameron Mason
What if user enter an input having more characters than bob.
Does your code work fine??
0
The first thing you want to do is print what the user entered, right?
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
0
I can help you, if you want solve it with C programming
0
Taranjeet but it'll replace asteric for blank space too in your code
0
Vignesh Vicky He said a word, not a sentence. So there would be no spaces.
0
Taranjeet I said that for your example given,not for what he asked bro