Question: PROGRAMMING PYTHON LAST 2 DIGITS OF ID =63210048 1. Question 1 (40 points). Do not forget to write your name and student ID in your

PROGRAMMING PYTHON

LAST 2 DIGITS OF ID =63210048PROGRAMMING PYTHON LAST 2 DIGITS OF ID =63210048 1. Question 1 (40

1. Question 1 (40 points). Do not forget to write your name and student ID in your answer to each question. Part (a) Create a list named list1 whose elements are the dig- its in your student ID number. Write a Python function named Squares which receives a list of numbers as an input argument and prints a list whose elements are squares of numbers in the input list. Call the Squares function by giving list1 as its in- put argument. Show the steps of your work clearly, including the steps for creating list1, defining Squares function, and calling Squares by giving list1 as its input argument. Part (b) Consider the function below (i.e., myfunction()). What value will be returned for the following call: myfunction(-40+ last 2 digits of your student ID number)? def myfunction(n): if (n > 0): n=n*4 return n else: n=n + 10 if (n%2 == 1): n=n+1 return n

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 Databases Questions!