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
belka [17]
3 years ago
15

Create a Python program as described below and save it in a file named bool. You should use IDLE or similar environment to creat

e your program. First develop a conceptual model and document it using either pseudo code or a flowchart to meet the requirements of the program described as follows.

Computers and Technology
1 answer:
Eva8 [605]3 years ago
8 0

PYTHON CODE

# function to compare a and b
def compare(a,b):

    # if a is greater than b , return 1
    if a > b:
        return 1

    # if a and b are equal, return 0
    elif a == b:
        return 0

    # if a less than b , return -1
    elif a < b :
        return -1


# testing
if __name__=="__main__":

    # calling the compare function with a and b
    print('compare(5,2) %d'%compare(5,2))
    print('compare(2,5) %d'%compare(2,5))
    print('compare(3,3) %d'%compare(3,3))

    # getting values for a and b
    a=int(input("Enter the value for a: "))
    b=int(input("Enter the value for b: "))

    print('compare(%d,%d) %d'%(a,b,compare(a,b)))

(see attachment for output)

You might be interested in
ASAP!!!!****** Need help!!!!
m_a_m_a [10]
I think it's right. 
<span>Text, numbers, graphics, or sound represented by discrete digits, such as 1s and 0s.</span>
6 0
3 years ago
It would be system unit on this test
Dima020 [189]
Yes thats correct- but if 
3 0
3 years ago
The ________ simulates your work area.
xz_007 [3.2K]
I believe it is, A. taskbar
5 0
3 years ago
Computers have drastically changed society over the last 20 years. How have computers affected communication in the business wor
iren2701 [21]

<u>Drastic change of over society Computers:</u>

In society computer has drastically changed and it has been used to for varies purpose to do analysis or storing data, as decisions making tools. Purpose computer been found is to do huge calculation. “Compute” word has been derived to computer. Computer later stage it diverted is purpose from calculation to information store device.

Computers have heavy effect the communication in normal word and business world. Especially social media took over the control of computers. In today’s world four type of ethical issue are known in computer mainstream in the workplace they are.

1. Crime (computer)

2. failure of responsibility in the computer.

3. Protection of software records and documents etc.

4. End user  data protection and privacy.

99% of computers are protected with firewalls and antivirus. But still hackers can hack the computer and steal the data.

5 0
3 years ago
In a linux script, the line ____ is important because it identifies the file as a script.
igor_vitrenko [27]
The closest line to that would be the first line:


#!/bin/bash

echo "Hello World!"


BTW, the "#!" is referred to as a she-bang. When those are the first characters executed, the (requires an absolute path) program that follows is launched, and the rest of this file is given to it as data. To run this like a program, the execute permissions need to be set ( chmod 0755 script.sh ).
8 0
3 years ago
Other questions:
  • Where are Micro USB connectors used the most?
    11·2 answers
  • Host A and B are directly connected with a 100 Mbps link. There is one TCP connection between the two hosts, and Host A is sendi
    14·1 answer
  • Data governance consists of? A. the processes, methods, and techniques to ensure that data is of high quality, reliable, and uni
    11·1 answer
  • The parameter passing mechanisn used in C is
    5·2 answers
  • When you use an external style sheet with an HTML document, you get all but one of the benefits that follows. Which one is NOT a
    15·1 answer
  • What layer in the Transmission Control Protocol/Internet Protocol (TCP/IP) model is responsible for defining a way to interpret
    11·1 answer
  • Find the Nearest Repeated Entries in an Array People do not like reading text in which a word is used multiple times in a short
    15·1 answer
  • What do people do when they navigate using GPS
    6·2 answers
  • What is file management?can please help me​
    14·2 answers
  • What operating system do most users use?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!