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
If you were to broadcast a live feed of the event, which type of editing would you choose?
Naily [24]
I would use instagram live
8 0
3 years ago
Abstract: Design, implement, explain, test, and debug a simple, but complete command- line interpreter named cli.
ZanzabumX [31]

Answer:

that is very long question ask a profesional

Explanation:

8 0
3 years ago
Which site had a major influence on the social gaming site Friendster?
Oduvanchick [21]
The answer is, "Ryze".
4 0
3 years ago
Read 2 more answers
PLZ HELP NEEDS TO BE ANSWERED ASAP THANK YOU
Stells [14]

In python:

lst = ([])

largest = 0

while len(lst) != 6:

   user_number = int(input("Enter a number: "))

   lst.append(user_number)

   for i in lst:

       if i > largest:

           largest = i

   print(largest)

I hope this helps

7 0
3 years ago
Define text processor​
jenyasd209 [6]

Answer:

The manuplating of text, especially the transformation of text from one format to another.

6 0
3 years ago
Other questions:
  • Question 1:
    15·1 answer
  • Which of the following guidelines about forwarding e-mail messages is most appropriate?
    12·2 answers
  • The google android mobile operating system is a proprietary system, for use on only approved devices.​
    10·1 answer
  • Which topology enables only one person, at one time, to send data to others on the network?
    6·1 answer
  • Why is investing in a mutual fund less risky than investing in a particular company's stock? A. Mutual funds only invest in blue
    14·2 answers
  • Which of the following best describes application software? coordinates hardware components provides system utilities like the c
    5·2 answers
  • Identify the following as True or False: (1) Naive Bayes is a linear classifier. (2) SVMs are only usable when the classes are l
    8·1 answer
  • What is the value of the variable result after these lines of code are executed?
    11·1 answer
  • All the network nodes are connected to each other
    8·1 answer
  • // This pseudocode segment is intended to compute the number
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!