Answer to Question #303056 in Python for Loki

Question #303056

Create a Python script which will accept a positive integer (n) and any


character then it will display the input character n times.



Sample Output:


Positive Integer (n) : 7


Input any Character : A


A A A A A A A




1
Expert's answer
2022-02-27T04:23:37-0500
n = int(input("Enter N          : "))
c = str(input("Enter a character: "))
s=""
for r in range(0,n):
    s = s + c
print(s)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS