Write a program the val of n and print 1/n,n^2,n^4,n^8 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Write a program the val of n and print 1/n,n^2,n^4,n^8

22nd Jul 2019, 6:32 PM
Ramakrishna Ks
Ramakrishna Ks - avatar
2 Answers
+ 1
Hi. Have been trying some? Can we help you to implement it correctly? Are you experiencing any errors or exception? Use "print ()" to create output Use "**" to calculate exponents Cheers.C.
22nd Jul 2019, 6:36 PM
ChrA
ChrA - avatar
+ 1
https://code.sololearn.com/c5TU978JdizG/?ref=app Well I don't think I understood your question very well but as per my understanding this is the answer for your question To get more values of n^something replace the 9 in range and add to which you want to print. The value of n is taken by the user in the above mentioned code
22nd Jul 2019, 7:19 PM
Rohit Panchal
Rohit Panchal - avatar