Please helpppp. Rearrange the parts of the program to generate two random integers and then ask the user to guess the greatest common divisor.
First part
Second part
Fourth part
Third part

1. from math import gcd
from random import randrange

numA=randrange(6,50,2)

numB = randrange(6,30,2)

if guess == answer:

print("Good job! You are right.")

print("The right answer is",answer)

answer = gcd(numA,numB)
guess = input("Greatest common divisor of " + str(numA) + " and " + str(numB) + "? " )

Answers

Answer 1

Answer:

first part:

from math import gcd  

from random import randrange

second part:

numA=randrange(6,50,2)

numB = randrange(6,30,2)

third part:

answer = gcd(numA,numB)

guess = input("Greatest common divisor of " + str(numA) + " and " + str(numB) + "? " )

fourth part:

if guess == answer:  

print("Good job! You are right.")

print("The right answer is",answer)

Explanation:

got it right on edge

Answer 2

C++ Random Number Generation with a Range The modulus operator can produce random numbers in any range, much like 1 and 10 do. For instance, you could write int random = 1+ (rand()% 100) to produce numbers between 1 and 100.

What programs to generate two random integers?

In the C/C++ computer languages, random number generation is accomplished using the rand() and srand() methods. The srand() value is fixed at 1, therefore the rand() function always produces the same results.

When we run the program, the same random number will be generated each time by the C++ rand() function. The srand (unsigned int seed) function is used to seed the rand() function.

Therefore, The pseudo-random number generation's starting point is set by the srand() function.

Learn more about random integers here:

https://brainly.com/question/15247918

#SPJ2


Related Questions

Stephanie would like to know the average number of regular hours worked by her employees. In cell B11, create a formula using the AVERAGE function to find the average number of regular hours her employees work in a week (B7:B10).

Answers

Answer:

Enter the following formula in B11

=AVERAGE(B7:B10)

Explanation:

Given

Cells: B7 to B10

Required

Determine the average

Cells B7 to B10 is represented as: B7:B10

To calculate the average of these cells in Excel, follow the below steps.

Start with =Type the name of the function: AVERAGE(Enter the cell range; B7:B10Close the bracket; )

So, we have:

=AVERAGE(B7:B10)

Write a loop to populate the list user_guesses with a number of guesses. Each guess is an integer. Read integers using int(input()).

Answers

Answer:

num_of_guesses = int(input())

user_guesses = []

for n in range(num_of_guesses) :

guess_value = int(input())

user_guesses.append(guess_value)

print("User guesses :", user_guesses)

Explanation:

Using python

Line 1 prompts the user to input the number of guesses he / she will like to make.

Line 2, initiates an empty list which will be used to store the numbers which will be guessed.

The for loop which uses the condition stated in line 1, that is, the user will only be able to make guesses based on the value enters into num_of_guesses

guess_value prompts user to enter a value which is added to the user_guesses list

The print statement, lists the numbers guessed by the user.

tara has started a new job and has been assigned to work on a team. she is anxious about getting along with her new team members. what is one piece of advice you could give to tara about working with others?

A. Ignore complaints.
B. Avoid gossip.
C. Give gifts.
D. Keep your ideas to yourself.​

Answers

Answer:

B. Avoid gossip.

Explanation:

A team can be defined as a group of people or set of individuals with various skill set, knowledge and experience coming together to work on a project or task in order to successfully achieve a set goal and objective.

This ultimately implies that, a team comprises of individuals, workers or employees having complementary skills, knowledge and experience needed to execute a project or task successfully. Therefore, workers working as a team usually interact with the other team members and as a result, this enhances performance and strengthen the level of relationship they share.

In this scenario, Tara started a new job and has been assigned to work on a team. She is anxious about getting along with her new team members. Hence, one piece of advice i would give to tara about working with others is to avoid gossip. Tara should ensure her discussions with the members of the team are plain, open (non-secretive), non-personal and mostly work-related.

Use the syntax SELECT ________ (expression) [Column Name] to limit the result set to the number of rows defined by the expression.

Answers

Answer:

Use the syntax SELECT _LIMIT_ (expression) [Column Name] to limit the result set to the number of rows defined by the expression.

Explanation:

The LIMIT keyword is often used to limit the number of rows returned in a result.  Usually, the Limit expression is combined with the "SELECT column_name(s) FROM table_name...WHERE condition" can be used to limit the result set to the number of rows defined by the expression, LIMIT.  The WHERE condition is optional, meaning it can be omitted.

What is one reason why a business may want to move entirely online?
O
A. To double the number of employees
B. To focus on a global market
C. To avoid paying state and local taxes
D. To limit the number of items in their inventory

Answers

Answer:

To focus on global market

Explanation:

Hope this helps! :)

7. Which cipher is based on the clues of the physical factors, rather than the hardware or a software cryptosystem

Answers

Answer:

The concealment cipher.

Explanation:

A concealment cipher also known as null cipher can be defined as an obsolete encryption format that typically involves the mixture of plaintext with non-cipher elements. This ultimately implies that, the plaintext is hidden in another message through encryption.

The concealment cipher is based on the clues of the physical factors, rather than the hardware or a software cryptosystem.

Basically, the concealment cipher is solely dependent on the clues of the physical factors that mainly affects the sender and receiver in a communication system.

A customer has several small branches and wants to deploy a Wi-Fi solution with local management using CAPWAP. Which deployment model meets this requirement

Answers

Answer:

Mobility express

Explanation:

Mobility express is defined as the ability to use the access point or the AP as a controller. It related to the lightweight network which is without a controller box. The access point of the mobility express uses CAPWAP images.

The CAPWAP stands for Control And Provisioning of Wireless Access Points. It is standard protocol which allows a central wireless of LAN access controller to use and manage the wireless access points.

Thus a customer who has various small branches and wishes to deploy a Wi-fi solution with the local management using CAPWAP should use the Mobility express as the deployment model.

HELP PLEASE WHAT DOES THIS MEAN!

Answers

Answer:

darling you have two brackets there

suspect that several users are attempting to install unauthorized software. Upon researching, you discover that the attempts were unsuccessful. What tool did you implement that logged those attempts and identified the users

Answers

Two factor authentication? I’m not sure

In PowerPoint online what can you add to your presentation from the insert tab
Animations
Designs
Pictures
Transitions

Answers

Answer:

pictures

Explanation:

if you have PowerPoint you can use it side by side

picturesssssssssssss

Write a function called nacho_reaction that returns a string based on the type of nacho passed in as an argument. From top to bottom, the conditions should correspond to: 'cheese', 'salsa', 'both', 'neither'.

Answers

Answer:

Following are the code to this question:

def nacho_reaction(nacho):#defining a method nacho_reaction that accepts a string variable

   return nacho#return parameter value

nacho=['cheese', 'salsa', 'both', 'neither']#defining list of string values

r = str(nacho)[1:-1]#use r variable that removes brace from string value

print(nacho_reaction(r))#calling nacho_reaction method that prints string value

Output:

'cheese', 'salsa', 'both', 'neither'

Explanation:

In this code, a method "nacho_reaction" is declared that accepts a list of a string variable in its parameter, and use a return variable, that prints its value.

In the next step, a "nacho" a list of an integer is declared, that holds a string value and uses the "r" variable, that removes the brace, and uses a print method that calls the "nacho_reaction" method to print string value.

Which of the following is NOT a category on a shot list

Answers

Answer:

What’s the following I will edit this and answer it if I can know

Explanation:

You need to update your router settings, so you log into the administration panel, whose Internet Protocol (IP) address is 192.168.0.1. Which IP version is this

Answers

Answer:

IPv4

Explanation:

An IP address is an acronym for internet protocol address and it can be defined as a unique number assigned to a computer or other network devices, so as to differentiate each device from one another in an active network system. Thus, an IP address is typically used to uniquely identify each computer or network devices connected to the internet or network.

In Computer networking, IP address are classified into two (2) main categories and these are;

1. Local (internal) IP address.

2. Global (external) IP address.

Also, the internet protocol (IP) address comprises of two (2) versions and these are;

I. Internet protocol version 4 (IPv4): this is the first and original version of the internet protocol which was introduced in 1983 using the Advanced Research Projects Agency Network (ARPANET). An example of an IPv4 address is 192.168.1.0.

II. Internet protocol version 6 (IPv6): it is the modified (latest) version of the IPv4 address system and as such can accommodate more addresses or nodes. An example of an IPv6 is 2001:db8:1234:1:0:567:8:1.

Hence, Internet protocol version 6 (IPv6) was developed and introduced to replace the previous version (IPv4); Internet protocol version 4. The best statement which describes a benefit of IPv6 over IPv4 is that, Internet protocol version 6 (IPv6) eliminates the use of hierarchy in addressing, making addresses easier to use because the size of the routing table is smaller (reduced) and as such making routing with IPv6 to be more efficient.

In this scenario, you need to update your router settings, so you log into the administration panel, whose Internet Protocol (IP) address is 192.168.0.1. Thus, this is the IPv4 IP version.

refers to guidelines for online behavior. a. Internet Rules b. Netiquette c. Net rules d. Web etiquette

Answers

Answer:

Option b (Netiquette) is the appropriate alternative.

Explanation:

Netiquette would be concerned about internet classrooms although it makes communication extra knowledgeable, straightforward as well as considerate, students are allowed to openly share experiences as well as provide feedback on assessments as well as internet communities as well as through e-mail. It's indeed exactly equivalent in quite a professional field environment to the responsible ways.

Those certain possibilities are not connected to something like the present case. So above, there's the correct solution.

Match the type of secondary storage devices to their examples.
CD
hard disk
flash memory
magnetic storage devices
arrowRight
optical storage devices
arrowRight
solid-state storage devices
arrowRight

Answers

Answer:

1. CD: optical storage devices.

2. HDD: magnetic storage devices.

3. flash memory: solid-state storage devices.

Explanation:

A storage device can be defined as a computer hardware that is typically used for the storage of data or any computer related information such as images, videos, texts, music, codes and folders.

Some examples of storage devices used in the field of computer science are;

1. Optical storage devices: it is circular in shape and includes compact disk (CD), DVD, Blu-ray disk etc. A compact disc (CD) is a small digital-optical disc that is used to store computer data using a laser beam. It is able to store digital data because it is made up of a polycarbonate (a tough-brittle plastic) with one (1) or more metal layers.

2. Magnetic storage devices: this is one of the most widely used storage devices and it comprises of hard disk drive (HDD), floppy diskette, magnetic strip etc.  

3. Solid-state storage devices: it is typically made up of integrated circuits and uses flash memory to store data.

Which document would be best created using Word online
Animation
Graph
Resume
Spreadsheet

Answers

Resume       

Answer:

c

Explanation: I took the test


Whenever you press a key, click the mouse or start an application, you're sending instructions tow
which computer part?

Answers

CPU (central processing unit)

Uses of browser extensions include: Select all that apply. A. blocking ads B. reformatting a hard drive C. translating web pages D. tracking online orders

Answers

Answer:

B. reformatting a hard drive

Explanation:

Browser extension is defined by its characteristics or ability to modify a web browser to users' taste. It is often considered as a software module which is a source code. It serves a lot of purposes some of which includes:

1. It serves as a keylogger to save users sensitive information like passwords on a website.

2. It can be used for ad inclusion and ad blocking on website pages. average.

3. It can assist in redirecting online search traffic elsewhere.

4. It can also track online activities such as transactions.

Hence, in this case, the correct answer is "option B. reformatting a hard drive."

A Browser Extension is known to be a little software module. It is used for blocking ads.

What are the uses of browser extensions?

A browser extension is known as a software that allow different kinds of extensions. It helps in;

The user interface modifications.Cookie management, ad blocking.The custom scripting and styling of web pages. etc.

They are known to be designed to boast user experience in a web browser when using web apps.

Learn more about browser extensions from

https://brainly.com/question/4116298

Electronic Equipment Design and implement a set of classes that define various types of electronics equipment (computers, cell phones, pagers, digital cameras, etc.). Include data values that describe various attributes of the electronics, such as the weight, cost, power usage, and the names of the manufacturers. Include methods that are named appropriately for each class and that print an appropriate message. Create a main driver class to instantiate and exercise several of the classes.

Answers

Answer:

Answered below

Explanation:

//This design is implemented with Kotlin.

class Equipment (val name: String,

var weight: Double,

var cost: Double,

val powerUsage: Double,

val manufacturers: String) {

fun equipmentSpecs( ){

print("Equipment is $name. It is

manufactured by

$manufacturers and costs

$cost. It weighs $weight and

usess $powerUsage amount of power")

}

}

//Driver class

class Driver{

fun main( ){

val cellPhone: Equipment = Equipment ("Samsung", 5.3, 20, 2.5, "Samsung labs")

println( cellPhone.name)

println(cellPhone.weight)

cellPhone.equipmentSpecs( )

}

}


Jim wants to enlarge a black-and-white photograph with a warm-black tone. What type of black-and-white paper emulsion should Jim use for this
process?
A chlorobromide
B. bromide
C. chloride
D platinum

Answers

Answer:

A. Chlorobromide

Explanation:

I took the test and got it right. (Plato)

The type of black-and-white paper emulsion should be used by Jim is chlorobromide. Thus, option (A) is correct.

What is emulsion?

A sort of colloid called an emulsion is created by mixing two liquids that wouldn't typically mix. A dispersion of the other liquid is present in one liquid in an emulsion.

Emulsions frequently occur in foods like egg yolk, butter, and mayonnaise. Emulsification is the process of combining liquids to create an emulsion.

According to the above scenario, Jim wishes to expand a warm-toned black-and-white photograph. For this purpose, he should use chlorobromide for black-and-white paper emulsion.

Paper covered with a chemical compound that is light-sensitive, which is inferred as photographic paper. When exposed to light, it captures the latent image.

Therefore, it can be concluded that option (A) is correct.

Learn more about emulsion here:

https://brainly.com/question/6677364

#SPJ2

What TSO command recovers waste space that was formerly occupied by deleted or updated members and is now available for use again

Answers

Answer:

Z-command

Explanation:

In IBM cloud pack, this TSO command that performs the functions of recovery and reuse as we are given in the question above is called Z-command.

rewrite the following program segment using a while loop instead of a for loop.

for(i=0;i<100;i++){
if (i%2===0){
print (i)
}
}​

Answers

Answer:

while i=0 or i<100:

if (i%2==0):

print(i)

You must give careful consideration before adding text to a placeholder because once text has been entered into a placeholder, the placeholder cannot be deleted.

True
False

Answers

False is your answer.

Reading Materials Design and implement a set of classes that define various types of reading material: books, novels, magazines, technical journals, textbooks, and so on. Include data values that describe various attributes of the material, such as the number of pages and the names of the primary characters. Include methods that are named appropriately for each class and that print an appropriate message. Create a main driver class to instantiate and exercise several of the classes.

Answers

Answer:

Answered below

Explanation:

//The designs are implemented in Kotlin.

//Book class

class Book (val title: String,

val type: String,

val numberOfPages: Int,

val author: String ,

val yearPublished: Int ) {

fun bookDescription( ){

print("Book title is $title. Written

by $author and published

in $yearPublished" )

}

}

//Driver class

class Main {

fun main( ) {

val novel: Book = Book("Animal Farm", "novel", 200, "Orwell", 1990 )

println(novel.title)

println(novel.author)

val description = novel.bookDescription( )

println(description)

val magazine: Book = Book("Forbes", "magazine", 50, "Michael", 1995)

}

}

Design and implement a set of classes that define various types of reading material: books, novels, magazines, technical journals, textbooks, and so on. Include data values that describe various attributes of the material, such as the number of pages and the names of the primary characters. Include methods that are named appropriately for each class and that print an appropriate message. Create a main driver class to instantiate and exercise several of the classes.

Answers

Answer:

Following are the code to this question:

please find the attached file.

Explanation:

In this code, four class "novels, magazines, technical journals, and textbooks", is defined, in which it holds their respective default constructor and the get and set method to hold the string and integer value, and in the book class the main method is defined, that creates its object and a switch to for search value and print its value.

New microwave how do i use it is it mad e by the alins and how do I cook

Answers

Assuming your cooking a packaged refrigerated/frozen meal, just follow the instructions.

Tip: NEVER use 'popcorn' mode to cook popcorn (unless the package says so)

Split the worksheet into panes at cell G1.

Answers

Answer:

1. Select below the row where you want the split, or the column to the right of where you want the split.

2. On the View tab, in the Window group, click Split.

Explanation:

Write a program whose input is a string which contains a character and a phrase, and whose output indicates the number of times the character appears in the phrase.

Answers

Answer:

The program in Python is as follows:

print("Enter a character followed by a phrase",end='')

word = input(": ")

char = word[0]

print("Occurrence: "+str((word.count(char))-1))

Explanation:

The prints an instruction to the user on how to input to the system

print("Enter a character followed by a phrase",end='')

This prompts and gets the user for input

word = input(": ")

This extracts the character from the input string

char = word[0]

This counts and prints the number of occurrence of the extracted character

print("Occurrence: "+str((word.count(char))-1))

True or false: pinhole cameras can be outfitted with very accurate viewfinders

Answers

Answer:

true

Explanation:

Answer:

True

Explanation:

Define the summary function, which takes as arguments a database (dict) and a dict of current stock prices. It returns a dictionary (dict or defaultdict) whose keys are client names (str) whose associated values are 2-tuples: the first index is a dictionary (dict or defaultdict) whose keys are stock names (str) and values are the number of shares (int) the client owns. The second index is the amount of money (int) the portfolio is worth (the sum of the number of shares of each stock multiplied by its current price). Assume each client starts with no shares of any stocks, and if a client owns 0 shares of a stock, the stock should not appear in the client’s dictionary. Recall positive numbers are a purchase of the stock and negative numbers a sale of the stock. E.g., if db is the database above, calling summary(db, {'IBM':65, 'Intel':60, 'Dell':55, 'Apple':70}) would return

Answers

Hi :). (_define Your question to answer) ,
Other Questions
I just don't understand how to do this URGENT!!! due in 1 hr pls help!! 30points THANK YOU history on our 50% of 32 less than a hundred greater than 100 but less than 150 or greater than 150 {7,21,63,189,..} write a rule for the geometric sequence Which pair of sides in this shape are parallel? R S P T RS and ST RS and PT QR and QP QR and ST Solve log x = 2 by changing it to exponential form.a. X = -20C. X=20B x=10^2D x=2^10 If two connected points objects pass through the same set of three points, the shapes created by each will be identical, regardless of the order in which each object was plotted. True !!PLS HELP ASAP!!In the process of creating ammonia (NH3), nitrogen gas (N2 ) is combined with hydrogen gas (H2) that is extracted from hydrocarbons such as methane (CH4) or propane (C3H8) gas. Manufacturers must determine the appropriate amount of each reactant so as to produce the highest yield of product.The balanced reaction for ammonia is below:N2+2H32NH3Explain why determining the limiting reactant is important to a manufacturer trying to produce NH3 and the effect of running out of reactant. The size of a cylinder changes with time. If r increases at the rate of 2 cm/min and h decreases at the rate of 7 cm/min, at what rate is the volume changing at the instant when r Judd puts password protection on all of his files, makes sure not to have any patient information open on his computer when he takes breaks, works well with his coworkers, and is in charge of training new employees. Which career pathway is Judd most suited for based on these skills?Support ServicesHealth InformaticsBiotechnologyDiagnostic Services In the diagram below of triangle KLM, N is a midpoint of K L and P is a midpointof LM. If NP + 3, and KM = 36 - 4x, what is the measure of NP? Charlie has 12 feet of rope. He cuts it into pieces that are each of a foot long. How many pieces of rope will he have? Find the acute angle between the lines. Round your answer to the nearest degree. 9x y = 4, 8x + y = 6 Bart and Celenia were filling a wading pool with water. Bart filled of the pool. Then Celenia filled of the pool. What part of the pool was not filled with water? PLZ HELP THXS uwu What is the slope of the line that passes through the points (3, 1) and (2, 5)?Show Work An energy source forces a constant current of 2A to flow through a light bulbfilament for twenty seconds. If 4.6 kJ is given off in the form of light and heatenergy, calculate the voltage drop across the bulb. SUPER EASY !!Write the equation in standard form of the line that has x-intercept -2 and y- intercept 4. Draw a tape diagram to represent the problem.In Mr. Dutton's class there are 4 boy for every 5 girl ?Use the tape diagram above to answer the question.If there are 16 males, how many females are in Mr. Dutton's class?If there are 18 student in Mr. Sutton's class, how many boy are there? How many girl are there? If 6x 10y9 is a true equation, what would be the value of -18x + 30y? two hot air balloons are traveling along the same path away from a town