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
algol13
3 years ago
8

Write a program that contains a main function and a custom, void function named show_larger that takes two random integers as pa

rameters. This function should display which integer is larger and by how much. The difference must be expressed as a positive number if the random integers differ. If the random integers are the same, show_larger should handle that, too. See example outputs. In the main function, generate two random integers both in the range from 1 to 5 inclusive, and call show_larger with the integers as arguments.
Computers and Technology
1 answer:
melisa1 [442]3 years ago
8 0

A program that contains a main function and a custom, void function named show_larger that takes two random integers as parameters.

Explanation:

  • The difference must be expressed as a positive number if the random integers differ.
  • If the random integers are the same, show_larger should handle that, too. See example outputs.

def main():

value_1=random.randrange(1,6)

value_2=random.rangrange(1,6)

def show_larger():    

difference= value_1=-value_2

if value_1 == value_2:

   print('The integers are equal, both are' + str(value_1))

You might be interested in
How much cell phone data does the average person use a month
azamat
It all depends on what you're doing online.
7 0
3 years ago
One part of a development team has completed an algorithm. Why is it important to share it with others on the team? Choose all t
Nadusha1986 [10]

Answer: B,C,D

Explanation:

5 0
3 years ago
The objects that you place on master pages are called _____.
Studentka2010 [4]
The answer to this is A.
3 0
4 years ago
Write a program that echos back any inputted integer greater than 1, and exits when a 0 is entered. Your program should use a co
denpristay [2]

Answer:

MIPS Code:

.data

newline: .asciiz "\n" #newline variable

.text

MAINLOOP:

li $v0, 5 #syscall to get user interger and store in $v0

syscall

add $a0, $zero, $v0 #moving the user input to $a0 from $v0

beq $a0, 0, EXIT #branching to EXIT when $a0 is 0

li $v0, 1 #syscall to print integer in $a0

syscall

li $v0, 4 #syscall to print newline

la $a0, newline

syscall

j MAINLOOP #jumping to MAINLOOP

EXIT:

Sample Output:

6

6

7

7

3

3

0

7 0
3 years ago
Suppose you are given a data set consisting of nominal attributes, such as color, which takes values such as red, blue, green et
Ratling [72]

Answer:

No, you can´t.

Explanation:

An SVM uses a binary system. In this case the data consists of nominal attributes which can´t be used directly into the SVM.

However, in order to transform this normal attribute into the binary system is necessary to order the information in two sequences, in which the colors are based into two information facts that will give the system the representation that needs.

3 0
4 years ago
Other questions:
  • Why did LISD had to block the game “among us”?
    8·2 answers
  • To insert a field between existing fields, right-click the column heading for the field that will follow the new field, and then
    11·1 answer
  • If images around the edges of a monitor do not look right, the computer might have a(n) access problem. hardware problem. Intern
    13·2 answers
  • How do you represent the decimal integer 50 in binary?
    14·1 answer
  • Two Smallest (20 points). Write a program TwoSmallest.java that takes a set of double command-line arguments and prints the smal
    7·1 answer
  • What is the grooming process as it relates to online predators?
    12·2 answers
  • Importance of spread sheets​
    8·2 answers
  • Assuming even parity, find the parity bit for each of the following data units. a. 1001011 b. 0001100 c. 1000000 d. 1110111
    12·1 answer
  • PLSS HELP ASAP ILL GIVE BRAINLIEST THANKS
    11·1 answer
  • How to get flash to work on chrome?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!