SpiralFlex
Well-Known Member
- Joined
- Dec 18, 2010
- Messages
- 6,960
- Gender
- Female
- HSC
- N/A
Hello and enjoy. =)
Rules are quite simple, post questions then a person responds and then they in turn posts another question.
Q1. Write a function that outputs a right isosceles triangle of height and width n. (Eg when n = 3)
*
**
***
Q2. Write a function to calculate if a number is prime. Return a message "//number// is a prime" if it is, if not return "//number// is not a prime".
Q3. A perfect number is a positive integer equal to the sum of its positive divisors excluding the number itself (aliquot sum). For example 6 is a perfect number. 1+2+3 = 6. Write a function to determine if a number is a perfect number.
Rules are quite simple, post questions then a person responds and then they in turn posts another question.
Q1. Write a function that outputs a right isosceles triangle of height and width n. (Eg when n = 3)
*
**
***
Q2. Write a function to calculate if a number is prime. Return a message "//number// is a prime" if it is, if not return "//number// is not a prime".
Q3. A perfect number is a positive integer equal to the sum of its positive divisors excluding the number itself (aliquot sum). For example 6 is a perfect number. 1+2+3 = 6. Write a function to determine if a number is a perfect number.
Last edited: