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
saw5 [17]
3 years ago
8

Write a Python program that gets a number using keyboard input. (Remember to use input for Python 3 but raw_input for Python 2.)

If the number is positive, the program should call countdown. If the number is negative, the program should call countup. Choose for yourself which function to call (countdown or countup) for input of zero.
Computers and Technology
1 answer:
sergiy2304 [10]3 years ago
3 0

Answer:

def countup():

pass

def countdown():

pass

x = int(input("Choose a number: "))

if x >= 0:

countup()

if x < 0:

countdown()

Explanation:

I start by getting a user input which is saved to variable called "x." I then make if statements to see whether is greater than, equal to, or less than 0. After that, I call the functions.

You might be interested in
You are creating a classification model from a DataFrame that contains data about traffic on highways in a US state, which conta
torisob [31]

Answer:

Split the data into two randomly sampled DataFrame,and then train the model with one DataFrame and test it with the other .As we have know labels in the data frame ,so this approch will give us a better picture on how accuractly our model is trained

Explanation:

Split the data into two randomly sampled DataFrame,and then train the model with one DataFrame and test it with the other .As we have know labels in the data frame ,so this approch will give us a better picture on how accuractly our model is trained

3 0
3 years ago
Windows pe includes networking components and allows you to use current windows drivers for network connectivity.
4vir4ik [10]
Indeed it is very true
4 0
3 years ago
Digital Blank______ track KPIs and CSFs by compiling information from multiple sources and tailoring it to meet user needs. Mult
aleksklad [387]

Digital Dashboard track KPIs and CSFs by compiling information from multiple sources and tailoring it to meet user needs.

<h3>What are digital dashboard?</h3>

This is known to be a kind of  an analysis tool that helps a lot of business men and women to be able to examine and analyze their most vital data sources in real time.

Note that Digital Dashboard track KPIs and CSFs by compiling information from multiple sources and tailoring it to meet user needs.

Learn more about digital dashboard from

brainly.com/question/14383144

#SPJ1

3 0
2 years ago
"A web server must be accessible to untrusted outside users. What can be done to isolate this host and any additional hosts with
Olegator [25]

Answer:

C.

Explanation:

Based on the information provided within the question it can be said that the best thing to do in order to accomplish this would be to create a DMZ and add all the necessary hosts to it. A DMZ or demilitarized zone is a feature that allows those on the list to bypass all security features and have access to the organization's external-facing services.

4 0
3 years ago
Write the ColorfulBouncingCircle class, where you should write the constructor, setPlayingFieldSize, and tick methods, and overr
Keith_Richards [23]

Answer: Circle class representing circle objects which have a radius, center x, and center y. It included overlaps and draw methods. Then, we wrote a Colorfulcircle class which included a Color property and overrode the draw method of Circle. For this assignment, you are asked to create a ColorfulBouncing circle class. Begin with the versions of Circle and ColorfulCircle uploaded to Canvas ColorfulBouncingCircle should extend ColorfulCircle, Unlike the other Circle classes, it will include a velocity for the x and y axes. The constructor for ColorfulBouncingCircle includes these parameters: public colorfulBouncingcircle (double radius, double centerx, double center Color color, double xVelocity, double yvelocity) Note that we are treating x as increasing to the right and y as increasing down, as with Java's graphics coordinates system. This was also seen with Circle's draw method. ColorfulBouncingCircles will bounce around in a playing field which the tester will provide. The Colorful Bouncinesicle class should have a public static method to set the playing field width and height: public static void setPlayingFieldsize (double newwidth, double newHeight) ColorfulBouncingCircle will also include a method which should alter its center and center with each time tick (similar to a metronome's noise guiding a musician to play a song). The circle's x position should be altered according to x velocity and y position according to y velocity. However, before changing the positions, check if the center position would, after moving, be either less than 0 or greater than the playing field dimensions. If so, instead of changing the center position, alter the velocity. If the ball hits the top or bottom, the sign of its vertical velocity should be flipped: if it hits the left or right, its horizontal velocity sign should be flipped. If it hits a corner, both should be. Notice that velocity may be positive or negativel The tick method which will be called by the tester is defined in this way:

public void tick() Finally, we should override the overlaps method to make balls bounce away from each other. You should call the super method to see if your circle overlaps another circle. If so, alter this circle's velocity according to its center relative to the other circle. If this circle" is above or below the "other circle," flip the sign of "this circle's" vertical velocity. If it's to the left or right, flip the horizontal velocity As before, both may be flipped. This is NOT the same as a true elastic collision, but it should be simpler for you to implement. The sign flipping will sometimes cause the balls to "vibrate" when caught between each other. Please review the velocity changing rules carefully; they are easy to get wrong!! To review: Write the ColorfulBouncineCircle class, where you should write the constructor setPlayingfield Size, and tick methods, and override the overlaps method, each according to the above descriptions. You should not have to write any code which draws; instead, a test program will be provided which will animate ColorfulBouncingCircles based on your implementation. For every time tick, the test program will compare every circle against every other circle using the overlaps method. The test program will ask you to press Enter in the console to launch the automated tests which will assign a tentative score based on your implementation. DO NOT ALTER the Circle OR Colorful Circle files!!

Explanation:

4 0
4 years ago
Other questions:
  • ¿como influye la tecnologia en su vida cotidiana?
    7·1 answer
  • What name are input devices, output devices, and auxiliary storage devices collectively known?
    9·1 answer
  • The google android mobile operating system is a proprietary system, for use on only approved devices.​
    10·1 answer
  • Which of these words does not describe factual data?
    8·2 answers
  • What was the Messana conflict
    7·1 answer
  • A pages visual organization is known as the
    14·2 answers
  • On the Excel Ribbon, click the Data tab in the Sort &amp; Filter Group, and then click the Sort button to conduct a _____ sort.
    8·1 answer
  • Two or more computers connected together is referred to as a(n)
    14·1 answer
  • Write any four difference between email and effects​
    14·1 answer
  • Which of these is true about moores law
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!