Question: 15. Define a function named t_1 which will print Hello World! In (1): #Type your answer here. f_10 NameError Traceback (most recent call last) /var/folders/21/r_jhahks6v3ftsjkn@xmp580098gn/T/ipykernel_88702/1391340867.py

 15. Define a function named t_1 which will print "Hello World!"
In (1): #Type your answer here. f_10 NameError Traceback (most recent call
last) /var/folders/21/r_jhahks6v3ftsjkn@xmp580098gn/T/ipykernel_88702/1391340867.py in 3 4 ----> 5 f_10 NameError: name 'f_1' is

15. Define a function named t_1 which will print "Hello World!" In (1): #Type your answer here. f_10 NameError Traceback (most recent call last) /var/folders/21/r_jhahks6v3ftsjkn@xmp580098gn/T/ipykernel_88702/1391340867.py in 3 4 ----> 5 f_10 NameError: name 'f_1' is not defined 16. Now define the same function t_1 and assign it to variable ans 1. See what happens. In : #Type your code here. def f_10: print("Hello world!") ans_1- print(ans_1) 17. Now define the same t1 function this time so that it returns a value instead of just printing it.. In : #Type your answer here. ans_1=f_10 print(ans_1) 18. Now create a function named f_1 which both prints and returns "Hello World! In (): # Type your answer here. ans_1=f_10 print(ans_1) 19. Create a function named f_1 which always returns the number: 100. In (): # Type your answer here. print(f_1(999)) 20. Create a function named 1 which takes an integer as input and then returns it. In 1: # Type your answer here. print(f.1(44)) 21. Can you define a function that takes a list as input and returns the reverse of that list? In (): # Type your answer here. Ist=[100, 200, 300, 400,500) f_1(1st) print(lst)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Chemical Engineering Questions!