Single parameter 1. Write a function print_digit() which . takes a single string parameter .prints all characters that a

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Single parameter 1. Write a function print_digit() which . takes a single string parameter .prints all characters that a

Post by answerhappygod »

Single Parameter 1 Write A Function Print Digit Which Takes A Single String Parameter Prints All Characters That A 1
Single Parameter 1 Write A Function Print Digit Which Takes A Single String Parameter Prints All Characters That A 1 (41.18 KiB) Viewed 47 times
Single parameter 1. Write a function print_digit() which . takes a single string parameter .prints all characters that are decimal digits, i.e. 0 - 9 def print_digit(a_string): - # complete the body of this function print_digit('24 hours in 1 day, 7 days in a 1 week.) message = 'I met a man with 7 wives. Each wife had 7 sacks.' print_digit(message) # output 2 4 1 71 > 7 7 2. Write a function print_even() which • takes a list of integer numbers as a parameter • prints all numbers that are even def print_even(a_list): # complete the body of this function print_even([1, 2, 3, 4, 5]) list_1 = (1, 3, 5, 7, 9, 11, 13, 15, 17, 20, 21, 20) list_2 - list(range(20, 0, -3)) print_even(list_1) print_even(list_2) # output >24 20 20 >20 14 8 2
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply