This community-built FAQ covers the “Exponents” exercise from the lesson “Learn Python: Syntax”.
Paths and Courses
This exercise can be found in the following Codecademy content:
Computer Science Data Science
FAQs on the exercise Exponents
Join the Discussion. Help a fellow learner on their journey.
Ask or answer a question about this exercise by clicking reply ( ) below!
Agree with a comment or answer? Like ( ) to up-vote the contribution!
Need broader help or resources ? Head here .
Looking for motivation to keep learning? Join our wider discussions .
Learn more about how to use this guide.
Found a bug ? Report it!
Have a question about your account or billing? Reach out to our customer support team !
None of the above? Find out where to ask other questions here !
catower
Split this topic
September 20, 2019, 10:07pm
2
catower
Split this topic
September 20, 2019, 10:08pm
6
2 posts were split to a new topic: What is 2 to the 10th power?
catower
Split this topic
September 20, 2019, 10:14pm
8
catower
Split this topic
September 20, 2019, 10:19pm
9
catower
Split this topic
September 20, 2019, 10:24pm
23
7 posts were split to a new topic: Troubleshooting math with strings
catower
Split this topic
September 20, 2019, 10:30pm
30
4 posts were split to a new topic: The math of exponent expressions
Line 4 was intentionally left blank. Was there a purpose for this? Could this program have been written without skipping line 4?
print(6 ** 2)
print(7 ** 2)
print(8 ** 2)
print(6 ** 4)
mtf
November 11, 2019, 4:19am
32
Yes it could. The blank line has no meaning to the interpreter, unlike how important indentation is.
Not sure why my solution is not a valid answer?
print(f"Number of squares needed for an 6x6 Square Quilt: {6**2}")
# 7x7 quilt
print(f"Number of squares needed for an 7x7 Square Quilt: {7**2}")
# 8x8 quilt
print(f"Number of squares needed for an 8x8 Square Quilt: {8**2}")
Answer:
Number of squares needed for an 6x6 Square Quilt: 36
Number of squares needed for an 7x7 Square Quilt: 49
Number of squares needed for an 8x8 Square Quilt: 64
Still saying the below:
Did you print 6 squared, 7 squared, and 8 squared?
I learnt about f-strings from the previous exercise’s forum section.
mtf
January 28, 2020, 8:36pm
34
The exercise does not ask for the text in one’s answer, only the values. No f -string, either. Just the values.
2 Likes
someone tell me 6**6 means 36 but answer was horribly something else …
someone explain me this exercise please
1 Like
yeah same happened to me what does it means am i wrong or something which i am not getting ???
tgrtim
August 3, 2020, 11:44am
37
I think the issue there is that 6 x 6 = 36. This is equivalent to 6-squared (62 ) which could be written as 6**2 which is then equivalent to 6 * 6.
6**6 would be six to the power of six which is (6 * 6 * 6 * 6 * 6 * 6).
The * symbol is multiplication and ** is exponentiation.
1 Like
Can someone explain to me why it was (6 ** 4) instead of something like (36 * 6) because if 6 people wanted a 6x6 that would be 36 for each person and that would allow each one of them to get a 6x6
mtf
August 13, 2020, 7:33pm
39
It is six people who each want six quilts. That will be 36 quilts in all. Each quilt has 36 squares, so there will be 36 * 36 squares.
36 * 36
(6 * 6) * (6 * 6)
6 ** 2 * 6 ** 2
By exponent law,
a ** m * a ** n == a ** (m + n)
so,
6 ** (2 + 2) => 6 ** 4
3 Likes
Why exactly does it turn into 36 * 36 ?
I’m sorry if i’m a bother but this is something I want to learn and understand so I appreciate you helping me out <3
mtf
August 13, 2020, 7:50pm
41
Six people times six quilts each is thirty six quilts. Each quilt is six squares long and six squares wide. That means thirty-six squares per quilt.
36 quilts times 36 squares each is 36 * 36 squares in all
3 Likes
Thank you for explaining you’ve been a big help
1 Like
yeahhh thats the thing i feel thanks