brunixmichael01 brunixmichael01
  • 05-08-2021
  • Computers and Technology
contestada

I need it in code please (python)

I need it in code please python class=

Respuesta :

yoooo65789 yoooo65789
  • 05-08-2021
python coded) pythooonn
Answer Link
TheOnlyLman3613
TheOnlyLman3613 TheOnlyLman3613
  • 05-08-2021

Answer:

def main():

 n = int(input("Enter a number to find its sum! "))

 sum = int((n*(n+1)) / 2)

 print(str(sum))

main()

Explanation:

Here is some code I quickly came up with, you can rehash it for your liking.

I basically took this formula and translated it into python code on line 3. Make sure you use paratheses correctly when translating forumlas or any equation, Order of Operations is everything.

Lmk if this helped!

Ver imagen TheOnlyLman3613
Answer Link

Otras preguntas

i need help with these problems
What are the differences between a chromosome and a DNA molecule
What is the hyperbole?
What is a cathode? A. The electrode that releases ions into the solution B. The electrode at which a reduction reaction occurs C. The electrode that is
write 3 different improper fractions that equal 4 2/3
what did adolf hitler do
carla's vacation will cost at least $718. she saves $85 each week. she already has $463. how many weeks,w,does she have to save before she has enough for the va
To calculate the velocity of an object the of the position vs time graph should be calculated
How did the roman catholic church and the orthodox church differ in their view on the relationship of church and state?
What is a sentence of devilment?