dogtotom
New Member
Veteran
hello i am Thomas and i like my D0G
Posts: 6
ROBLOX Username: dogtotom
|
Post by dogtotom on Apr 27, 2017 11:03:10 GMT
Can somebody make me a code that prints cheesecake for each number that is inputted (in python)
for example 1 = cheesecake
3 = cheesecake cheesecake cheesecake
|
|
|
Post by Josh on Apr 27, 2017 11:11:25 GMT
Hi dogtotom!
The following code should work in both Python2 and Python3!
print("cheesecake "*int(input())) The program takes an integer as input and outputs "cheesecake " replicated n times, n being the input given.
Next time you post here, please ensure that you present us with code that you have already tried so that we can figure out how to solve your problem!
|
|