Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 =63210048
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 nStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started