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
weeeeeb [17]
3 years ago
9

Write an expression that executes the loop while the user enters a number greater than or equal to 0.

Computers and Technology
1 answer:
anyanavicka [17]3 years ago
5 0

num = 1

while num >= 0:

   num = int(input("Enter a number greater than or equal to 0: "))

I hope this helps!

You might be interested in
Is it true that if the user log out the computer will turn off automatically​
sergiy2304 [10]
Yes that is a true statement
8 0
2 years ago
Read 2 more answers
Ned and Mary Ann are saving their files to a CD. When prompted, Ned will click on Burn file to disk, indicate the recording spee
r-ruslan [8.4K]

Answer:

Should be Ned.

5 0
3 years ago
What electronic device can represent a KiloByte?
katovenus [111]

Military specifications often call for electronic devices to be able to withstand accelerations of 10 g. to make sure that their products meet this specification, manufacturers test them using a shaking table that can vibrate a device at various specified frequencies and amplitudes. if a device is given a vibration of amplitude 9.4 cm, what should be its frequency in order to test for compliance with the 10 g military specification? the acceleration of gravity is 9.81 m/s 2 .

7 0
3 years ago
The Monte Carlo method is commonly used to approximate areas or volumes of shapes. In this problem, we will use Monte Carlo to f
sdas [7]

Answer:

import numpy as np

import matplotlib.pyplot as plt

def calculate_pi(x,y):

   points_in_circle=0

   for i in range(len(x)):

       if np.sqrt(x[i]**2+y[i]**2)<=1:

           points_in_circle+=1

       pi_value=4*points_in_circle/len(x)

       return pi_value

length=np.power(10,6)

x=np.random.rand(length)

y=np.random.rand(length)

pi=np.zeros(7)

sample_size=np.zeros(7)

for i in range(len(pi)):

   xs=x[:np.power(10,i)]

   ys=y[:np.power(10,i)]

   sample_size[i]=len(xs)

   pi_value=calculate_pi(xs,ys)

   pi[i]=pi_value

 

print("The value of pi at different sample size is")

print(pi)

plt.plot(sample_size,np.abs(pi-np.pi))

plt.xscale('log')

plt.yscale('log')

plt.xlabel('sample size')

plt.ylabel('absolute error')

plt.title('Error Vs Sample Size')

plt.show()

Explanation:

The python program gets the sample size of circles and the areas and returns a plot of one against the other as a line plot. The numpy package is used to mathematically create the circle samples as a series of random numbers while matplotlib's pyplot is used to plot for the visual statistics of the features of the samples.

4 0
3 years ago
When you see a blank pointer this means you can drag the row or column border to change height or width
Orlov [11]
No, you would see arrows pointing in opposite directions <--> like so
7 0
3 years ago
Other questions:
  • When purchasing a(n) ________ computer, having cellular as well as wifi can be important?
    9·1 answer
  • Interest rate risks would be most relevant to what purchase?
    7·2 answers
  • Which of the following commands would you use to start the program Main with four strings? a. java Main arg0 arg1 arg2 arg3 b. j
    11·1 answer
  • What is the role of the federal government in regulating the media and the internet?
    6·2 answers
  • Which Tab contains the font style attributes?<br><br> Home<br> Insert<br> Review<br> View
    8·2 answers
  • To create a chart, you need to select at least
    8·1 answer
  • Can someone help please
    12·1 answer
  • You can use colors, patterns, and borders to enhance the overall appearance of a worksheet and to make it easier to read. One of
    11·1 answer
  • Discuss how printing, publishing, and e-learning industries have transformed on evolved due to developments and advances the fie
    14·1 answer
  • What type of access controls allow the owner of a file to grant other users access to it using an access control list
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!