Printing a string with variables inside another string

You want to also create a duplicate copy of the message for your records, that is clearly marked as the teacher's copy. What is the output if we try to put the string inside another string?

1
2
3
4
5
6
name = 'Aditya'
score = 98

message = "Hi %s. You achieved a score of %d." % (name, score)

print "Teacher's Copy: %s" % message

×

Problem Loading...

Note Loading...

Set Loading...