Sep-29-2017, 01:10 PM
(This post was last modified: Sep-29-2017, 01:24 PM by sparkz_alot.)
Hey Guys, I'm new to Python and Coding stuff. I just started using Python for my course. So I decided to See a few Tutorials but for this particular code I can't seem to make it work. Please Help Me.
This is the code:
Note: I have edited some of the code since the OP who make that tutorial using Python 2. This is the closest result I can get.
Original Code:
This is the code:
print (("%s is a very #s person. He usually spend all his time #s.") % (input("Please enter a name: ")), (input("Please enter adjective: ")), (input("Please enter 'ing' verb: ")))This is my result:
Output:Please enter a name: Bill
Please enter adjective: Deranged
Please enter 'ing' verb: Killing
Bill is a very #s person. He usually spend all his time #s. Deranged Killing
As you can see, the #s is still visible and it did not substitute with both Adjective and Ing.Note: I have edited some of the code since the OP who make that tutorial using Python 2. This is the closest result I can get.
Original Code:
print (("%s is a very %s person. They usually spend all their rime %s.") % input ("Please enter a name: "), input ("Please enter an adjective: "), input ("Please enter an 'ing' verb: "))