(Python Example for Citizen Data Scientist & Business Analyst) Write a Python function to create and print a list where the values are square of numbers between 1 and 30 (both included). Sample Solution: Python Code: def printValues(): l = list() for i in range(1,21): l.append(i**2) print(l) printValues() Sample Output: [1, 4, 9, … Continue reading Python Example – Write a Python function to create and print a list where the values are square of numbers between 1 and 30 (both included)
Copy and paste this URL into your WordPress site to embed
Copy and paste this code into your site to embed