Question

1. Complete the function asn2_1() so it prints the string that is passed to it as...

1. Complete the function asn2_1() so it prints the string that is passed to it as a parameter.

import turtle

def asn2_1(s):

'''Prints string s'''

pass #This statement does nothing - you can delete it or leave it

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Below is the solution:

def asn2_1(s): #This is function that passess the parameter
    print(s) # prints the string

str="Hello This is string." #declare string
asn2_1(str) #call function

sample output:

Hello This is string.

Add a comment
Know the answer?
Add Answer to:
1. Complete the function asn2_1() so it prints the string that is passed to it as...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT