1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
olchik [2.2K]
3 years ago
10

Can you please make a simple python program? I will give you 20 points and branliest if it is good! It must include:

Computers and Technology
2 answers:
svetoff [14.1K]3 years ago
4 0

Answer:

# Newton's Law of Universal Gravitation

import math

print("This program will calculate the gravitational force between two objects")

# Gravitational Constant

G = 6.67408

while True:

   try:

       m1 = float(input("\nInput mass of first object (in kilograms): "))

       break

   except ValueError:

       print("Invalid input!")

while True:

   try:

       m2 = float(input("Input mass of second object (in kilograms): "))

       break

   except ValueError:

       print("Invalid input!")

while True:

   try:

       d = float(input("Distance between the objects (in meters): "))

       break

   except ValueError:

       print("Invalid input!")

force = G * (m1 * m2) / math.pow(d, 2)

print("The gravitational force between these two objects is {0} newtons!".format(force))

alekssr [168]3 years ago
3 0

Answer:

# Solve the quadratic equation ax**2 + bx + c = 0

# import complex math module

import cmath

a = 1

b = 5

c = 6

# calculate the discriminant

d = (b**2) - (4*a*c)

# find two solutions

sol1 = (-b-cmath.sqrt(d))/(2*a)

sol2 = (-b+cmath.sqrt(d))/(2*a)

print('The solution are {0} and {1}'.format(sol1,sol2))

Hope This Helps!!!

You might be interested in
What will be the output of the following program? Assume the user responds with a 5.
FrozenT [24]

The output will be: You owe $ 15.0

4 0
4 years ago
Edhesive 7.2 code practice Write a function named ilovepython that prints out I love Python three times. Then, call that functio
Marysya12 [62]

Answer:

def i_love_python():

   for _ in range(3):

       print("I love Python")

i_love_python()

Explanation:

3 0
3 years ago
Habilidades de la alfabetizacion digital?
Eva8 [605]

Answer:

La American Library Association (ALA) define la alfabetización digital como "la capacidad de utilizar las tecnologías de la información y la comunicación para encontrar, evaluar, crear y comunicar información, lo que requiere habilidades cognitivas y técnicas".

6 0
3 years ago
A text-only forum accessed through a bulletin board service (BBS) is known as a _____.
Tcecarenko [31]

Answer:

newsgroup---for apex

3 0
3 years ago
If you are logged on to Windows Live Messenger, why would you be unable to engage
Mazyrski [523]

Answer:

I'm not sure i haven't had that problem

Explanation:

7 0
3 years ago
Other questions:
  • What type of organism forms the base of food webs?
    9·1 answer
  • To what are multiple servers arranged in racks related
    14·2 answers
  • In the ADT graph the methid addVertex has efficiency
    15·1 answer
  • Ruben is helping his team choose a leader. Of the people Ruben is considering, which one has qualities most related to being an
    5·2 answers
  • What is a good safety precaution to take when opening a computer case?
    9·1 answer
  • What is essential to delivering a successful presentation?
    5·2 answers
  • What is one advantage of using object-oriented programming?
    14·2 answers
  • On the Format tab, which group allows you to select a different font for a chart?
    7·2 answers
  • Binary numbers are based on __________.
    12·2 answers
  • A _____ is a computer that is deliberately set up to be easily hacked into.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!