Write a Python function to create and print a list where the values are square of numbers between 1 and 30 (both included)

  • برمجة
  • برمجة بايثون

Write a Python function to create and print a list where the values are square of numbers between 1 and 30 (both included)

الأجوبة

def printValues():
	l = list()
	for i in range(1,21):
		l.append(i**2)
	print(l)
		
printValues()
هل كان المحتوى مفيد؟

تبحث عن مدرس اونلاين؟

محتاج مساعدة باختيار المدرس الافضل؟ تواصل مع فريقنا الان لمساعدتك بتأمين افضل مدرس
ماهو التخصص الذي تبحث عنه؟
اكتب هنا...