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]
2 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]2 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]2 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
A(n) ______________ ________________ attack keeps the target so busy responding to a stream of automated requests that legitimat
Tanya [424]

Answer:

denial-of-service (DoS) attacks

Explanation:

8 0
3 years ago
Which troubleshooting tool enables you to connect to a user's remote computer, view and interact with the user's screen, and cha
DaniilM [7]
That would be Remote assistance.
6 0
3 years ago
Who is known as the father of computer? ​
juin [17]

Answer:

Charles babbage ok my boy

8 0
3 years ago
Read 2 more answers
Besides the decimal number system that is most common (base 10), two other number systems that can be used in c++ programs are _
Paha777 [63]

Answer:

Binary number system

ASCII number system

Explanation:

C++ uses binary number system to define machine level language of the code written in high level languages and ASCII system to define the characters on key board for background low level coding an thus each character on the keyboard has a number associated with it to define it uniquely.

7 0
2 years ago
What type of laptop display technology provides fast refresh rates with relatively little power and does not require a backlight
saveliy_v [14]

Answer:

LCD

Explanation:

Liquid Crystal Display

3 0
3 years ago
Other questions:
  • Which item would you most likely keep in a database
    9·2 answers
  • _____ allow you to logically separate ports in switches to create subdomains without wiring your network as physical subdomains.
    7·1 answer
  • What is the nickname given to the new generation that was raised entirely within the digital age and often communicates through
    7·2 answers
  • HELP 10 POINTS
    5·1 answer
  • / Looks up author of selected books
    15·1 answer
  • modified true or false analyze each statement then write technical the statement is true the statement is false underline the wo
    6·1 answer
  • A set of blocks contains blocks of heights 1,2, and 4 centimeters. Imagine constructing towers of piling blocks of different hei
    15·1 answer
  • True or False: To create a function in python, you start with the keyword "def"
    5·2 answers
  • -(-13) P binary using signed. 2's complement representation
    11·1 answer
  • Samantha is looking for a lens that is lightweight and small, making it easy to transport. She doesn’t care about the lens being
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!