Question

Find the sum of the first 23 to the n (23 exponent n) multiples of 23 for a given n using PYTHON. The value of n will no...

Find the sum of the first 23 to the n (23 exponent n) multiples of 23 for a given n using PYTHON. The value of n will not be small. Example (n = 12 ⇒ 5522883785959772985105087173078663)

0 0
Add a comment Improve this question Transcribed image text
Answer #1

_Python CODE ::

Multiples.py int(input (Enter the n vaLue : )) # Taking Input for n for i in range(1,24): # iterating loop for 23 values pr

Output ::__

File Edit View Search Terminal Help aj@dlr3wolf:/tmp/Q$ ls Multiples.py aj@dlr3wolf:/tmp/os python3 Multiples.py Enter the n

RAW PYTHON CODE ::...............

________________________________ Multiples.py ______________________________________

n = int(input("Enter the n value : ")) # Taking Input for n
for i in range(1,24): # Iterating loop for 23 values
   print("{0} x {1:2} = {2}".format(n,i,n*i)) # printing

*********************************************************************************************************************

Add a comment
Know the answer?
Add Answer to:
Find the sum of the first 23 to the n (23 exponent n) multiples of 23 for a given n using PYTHON. The value of n will no...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Find the sum of the first n composites that do not end in the digit 2....

    Find the sum of the first n composites that do not end in the digit 2. (n = 6 ⇒ 51) using python

  • Find the sum of all multiples of int m that are less than or equal to...

    Find the sum of all multiples of int m that are less than or equal to int n. Assume that m and n are positive. For example, sumMultiples(3, 10) returns 18 because the multiples of 3 that are less than or equal to 10 are 3, 6, and 9, and 3 + 6 + 9 = 18. sumMultiples(3, 10) → 18 sumMultiples(10, 20) → 30 sumMultiples(10, 9) → 0

  • Python Program Fill in the blanks in the following Python code.   It should create in sum...

    Python Program Fill in the blanks in the following Python code.   It should create in sum the sum of all values within the dictionary mydict. sum = ____________________ for _______________________:     _______________________ For example, if mydict = {"cat":12, "dog":6, "elephant":23} then executing the code should result in a sum having the value 12+6+23 == 41 Your code should work for any dictionary mydict.

  • Given the binary value 01001111000 representing a IEEE style float using an 5 bit exponent and...

    Given the binary value 01001111000 representing a IEEE style float using an 5 bit exponent and 5 bit significand. Do NOT use spaces in answers. What is the bias used (in decimal) ? [b] What is the biased exponent (in binary) stored in this number [bb]?. What is the biased exponent (in decimal) represented by this number? [be] Express the value stored in mixed scientific notion. (Example 1.111111 x 2^100) ? [sig] x 2^[exp] What is the unsigned decimal integer...

  • The following series. a) Use the sum of the first 10 terms to estimate the sum of the given serie...

    the following series. a) Use the sum of the first 10 terms to estimate the sum of the given series. (Round the answer to six de 10 (b) Improve this estimate using the following inequalities with n 10. (Round your answers to six decimal (c) Using the Remainder Estimate for the Integral Test, find a value of n that will ensure that the error in th n>22 O n 13 On>0 O n> -22 d Help? the following series. a)...

  • Write a recursive function in Python to find the sum of digits of a number. Name...

    Write a recursive function in Python to find the sum of digits of a number. Name the function sum_of_digits. The function should use recursive algorithm (calling itself). The function should print out the sum of all the digits of a given number. For example, sum_of_digits(343) should have a output of 10. Marks will be deducted if you do not follow strictly to the instructions. [3]: N 1 def sum_of_digits(n): HNM in sum_of_digits (343) Out[3]: 10

  • Matlab function to solve an inequality that has a summation problem on one side. I have...

    Matlab function to solve an inequality that has a summation problem on one side. I have to write a function that uses a while loop and determines the biggest exponent value(k) in the summation out = symsum(2^i,i,o,k) that exceeds the input n in the inequality out > n so i need it to test the values of k from 1 on until out is the closest over n it can be. this assignment you will write two functions. The first...

  • Calculate the left Riemann sum for the given function over the given interval, using the given...

    Calculate the left Riemann sum for the given function over the given interval, using the given value of n. (When rounding, round your answer to four decimal places. places.) HINT [See Example 2.] f(x) = 27x2 over [-2, 2], n = 4 Need Help? Read It Watch It Talk to a Tutor -/1 points WANEAC7 6.3.007.MI. Calculate the left Riemann sum for the given function over the given interval, using the given value of n. (When rounding, round answers to...

  • PYTHON: (Sum the digits in an integer using recursion) Write a recursive function that computes the...

    PYTHON: (Sum the digits in an integer using recursion) Write a recursive function that computes the sum of the digits in an integer. Use the following function header: def sumDigits(n): For example, sumDigits(234) returns 9. Write a test program that prompts the user to enter an integer and displays the sum of its digits. Sample Run Enter an integer: 231498 The sum of digits in 231498 is 27

  • ANSWER USING JAVA CODE (1)The sum of the squares of the first ten natural numbers is,...

    ANSWER USING JAVA CODE (1)The sum of the squares of the first ten natural numbers is, 12 + 22 + ... + 102 = 385 The square of the sum of the first ten natural numbers is, (1 + 2 + ... + 10)2 = 552 = 3025 Hence the difference between the sum of the squares of the first ten natural numbers and the square of the sum is 3025 − 385 = 2640. Find the difference between the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT