Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a Python program to print all Perfect numbers between 1 to n. (Use any loop you want) Perfect number is a positive integer which

image text in transcribed

Write a Python program to print all Perfect numbers between 1 to n. (Use any loop you want) Perfect number is a positive integer which is equal to the sum of its proper positivee divisors Proper divisors of 6 are 1, 2, 3 Sum of its proper divisors 12 3 6 Hence 6 is a perfect number proper divisor means the remainder will be 0 when divided by that number. Sample Input: n 1000; Sample Output: 6, 28, 496 * Write a Python program to print equilateral triangle or Pyramid star pattern series of n rows using for loop Sample Input : 5 Sample Output *x*k xx

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Marketing Database Analytics

Authors: Andrew D. Banasiewicz

1st Edition

0415657881, 978-0415657884

More Books

Students also viewed these Databases questions