Add the beginning comments at the top of the program.
In the first part of your program, create a for loop that runs three times:
Inside the for loop, prompt the user for an integer
Prompt the user for another integer
Call the function compare (you are going to create this function next)
Pass the variables that you used for the integer inputs from above
Create a function called compare (remember the function definition should go at the top of the program) and use two variables in the parameters of the function:
Inside of the function, create an if / elif / else structure that compares the two values passed into the function
If one value is less than the other, output that to the user (Ex: 2 is less than 4)
Elif the other value is less than the other output something similar (Ex: 4 is less than 9)
Else, output that they are equal to each other
That is it for the first part of the program.
Next, create an empty list called names.
Create a loop that runs 6 times:
Inside of the for loop, prompt the user for a name
Append the name to the list
Outside of the for loop, prompt the user for how many people they would like to vote off the island.
Call the function eliminate and pass the variable you used from step 7 to it.
Also, this function will return a value, so store this back function call back to a new variable.
Create a function called eliminate and create a variable to use as the parameter:
Inside the function, randomly shuffle (use the shuffle() method) all the values in the list (you will need to import random at the top of the program)
Then using a for loop, loop it as many times as the value that was passed to the function:
Inside the for loop, remove one name from the list (use the pop() method)
Outside the for loop, but still inside the function, return the list of remaining people
Underneath where you left off in step 8, print the remaining people that are left: those that did not get voted off the island.
WILL GIVE BRAINIEST!

Answers

Answer 1

Answer:

#################

# Python Practice

#################

# Part 1

# ------------------------------------------------------

run_compare = 3

ran_compare = 0

while run_compare != ran_compare:

   num1 = int(input('Please input the first number: '))

   num2 = int(input('Please input the second number: '))

   def compare(number1, number2):

       if number1 < number2:

           print(f'{num1} is less than {num2}')

       elif number1 > number2:

           print(f'{num1} is greater to {num2}')

       else:

           print(f'{num1} is equal than {num2}')

   compare(num1, num2)

   ran_compare += 1

# ------------------------------------------------------

# Part 2

run_name = 6

ran_name = 0

names = []

# ------------------------------------------------------

while run_name != ran_name:

   name = input(str('Please insert a name: '))

   names.append(name)

   print(names)

   ran_name += 1

# ------------------------------------------------------

give me a second im going to resolve the last part but this is what i have so far

Answer 2

Following are the program to the given question:

Program Explanation:

Import random package as r.Defining a method "compare" that takes two variable "n1,n2" inside the parameter.In the next step, a conditional statement is declaed that checks the parameter value and prints its value. Defining a method "eliminate" that takes two variable "n, names" inside the parameter.It calls the shuffle method, and define a for loop that removes names value and return its value.In the next step, a for loop is defined inside this two variable "i1, i2" is declared that inputs value and calls the comapre value.In the next line, an empty list "names" is declared inside this a for loop is defined that inputs name value and calls the "eliminate" method and print its calculated value.

Program:

import random as r#import package random

def compare(n1, n2):#defining a method compare that takes two parameters  

   if n1<n2:#defining if block that checks n1 value less than n2 value

       print("{} is less than {}".format(n1, n2))#print value with the message

   elif n2<n1:#defining if block that checks n2 value less than n1 value

       print("{} is less than {}".format(n2, n1))#print value with the message

   else:#defining else block

       print("{} and {} are equal".format(n1, n2))#print value with the message

def eliminate(n, names):#defining a method eliminate that takes two parameters

   r.shuffle(names)#calling the shuffle method

   for i in range(n):#defining a for loop that checks n values

       names.pop()#calling pop method to remove value

   return names #return a names value  

for i in range(3):#defining a for loop that inputs value

   i1 = int(input("Enter an integer: "))#defining i1 value to input value

   i2 = int(input("Enter another integer: "))#defining i2 value to input value

   compare(i1, i2)#calling the compare method  

   print()#using print to break line  

names= [] #defining an empty list      

for i in range(6) :#defining a loop that inputs name value

   name = input("Enter name: ")#defining name variable that inputs value

   names.append(name)#calling append method  

n = int(input("\nHow many people you would like to vote off the island: "))#defining n variable that input value

new_names = eliminate(n, names)#defining new_names that calling eliminate method

print("\nRemaining people that did not get voted off the island:")#print message

if(len(new_names) != 0):#defining if block that checks new_names length not equal to 0

   for name in new_names:#defining a for loop that checks name is in new_names

       print(name)#print name value

else:#defining else block  

   print("None")#print message None

Output:

Please find the attached file.

Learn more:

brainly.com/question/21922031

Add The Beginning Comments At The Top Of The Program.In The First Part Of Your Program, Create A For

Related Questions

When save a newly created template, you use which extension for the file type? .doc, .docx, .doct, .dotx?

Answers

Answer:

The main difference between the two file formats is that in DOC, your document is saved in a binary file that includes all the related formatting and other relevant data while a DOCX file is actually a zip file with all the XML files associated with the document.

Writea SELECT statement that uses the ranking functions to rank products by the total quantity sold. Returnthese columns:The product_name column from the Products tableA column named total_quantity that shows the sum of the quantity for each product in theOrder_Items tableA column named rank that uses the RANK function to rank the total quantity in descending sequenceA column named dense_rank that uses the DENSE_RANK function to rank the total quantity in descending sequence

Answers

Answer:

SELECT  product_name, SUM(DISTINCT quantity) AS total_quantity

RANK() OVER (PARTITION BY total_quantity ORDER BY product_name) AS rank,

DENSE_RANK () OVER (ORDER BY quantity DESC) AS dense_rank

FROM Order_items

JOIN products ON Order_items.product_id = products.product_id

GROUP BY product_id

Explanation:

The SQL query returns four columns namely, product name, total quantity, rank and dense rank. The query uses the rank and the dense rank function to return the rows according to numeric ranks.

Which binary number is equivalent to the decimal number 104?

Answers

The correct answer is 0110100 :)

How much data can a flash drive store?​

Answers

Answer:

depends on which flash drive

Explanation:

32GB-1000 photos

Well, It just depends on which size you get. You could get a 512 MB or 10 GB. I prefer somewhere in the middle because I don't need to store a lot of stuff in my Flash drive.

Bradley is working on a program that uses different classes in specific relationships. Help him remember what these relationships are called.

(blank) is when a class uses objects of another class.

A. Aggregation
B. Inheritance
C. Dependency

(blank) is a special case in which one object “owns” another.

A. Dependency
B. Composition
C. Aggregation

Answers

Answer:

First one is INHERITANCE. Second one is AGGREGATION.

Which of the following are risks to a network?
a Sending emails
b. Granting administrator access to a non-administrator
c. Opening files from unknown senders
d. Unwanted advertisements

Answers

Answer:

option  b and c are correct answers.

Explanation:

Let see each option in detail.

a) Sending email is not a risk.

b) Granting access is a problem because the other person can undermine the network

c) Unknow senders can send virus or other malicious code to corrupts you data.

d) Unwanted advertisement is not a big deal.

Answer:

Granting administrator access to a non-administrator  

 Opening files from unknown senders

Explanation:

Psst those are the answers

Helen is working on her colleague’s photos. She came across this particular photo and was confused about which effect the photographer had used in the photo. Can you help her figure out the effect?
The effect used in the photo is

Answers

Answer:

it could be Tilt-shift - Tilt-shift effect - or Miniature faking.

Explanation:

Fill in the blank are always hard when the system has a set answer. But photographers commonly use the tilt-shift effect to focus on a certain part of the image while blurring the rest of the photograph. They refer to this as selective focus. You can use the tilt-shift effect and selective focus for miniature faking. This is where the subjects in the photograph appear miniaturized. Hope this helps

Answer: tilt-shift

Explanation:

The advancement of technology in our daily lives has changed how we interact with the world.

Answers

i agree. i think there’s less communication, more anger, mental issues.

Please help this computer science question(Pseudocode and Trace table)

Answers

Answer:

can u explain more specific plz

Explanation:

Which of these parts serves as the rear cross structure of a vehicle?
Rear body panel
Rear bumper cover
Rear rails
Rear core support
ontents

Answers

Answer:

Rear bumper cover

Explanation:

4.8 Code Practice: Question 1
I need help

Answers

for x in range(5,76,5):

   print(x, end=" ")

I wrote my code in python 3.8. Hope this helps

PLS HELP ASAP- Select the correct text in the passage.
Which concept explained in the paragraph below means that data always remains consistent?

Specific programs have some tasks that a computer must perform in parallel with others. These tasks (such as the performance of the same set of operations on different data sets) often work in parallel clusters. In such cases, a separate thread of execution handles each separate task. You can think of a thread as a sequence of instructions that computers can manage independently.
It is possible for different threads to access the same data elements and change their values, and this can lead to an inconsistent state of information. For instance, if multiple programs access a shared variable x and change its value, the variable will not contain the correct value at the end of the programs. We can prevent such inconsistencies by using locks. A thread puts a lock on shared data, and releases this lock only after completing its operations.

Answers

Answer:

reread the text

Explanation:

I do it it helps

Answer:

A thread puts a lock on shared data, and releases this lock only after completing its operations.

The last sentance

Explanation: TRUST ME ISTG THATS THE ANSWER

Review how to write a for loop by choosing the output of this short program.

for counter in range(3):
print(counter * 2)


Please explain it to me, I’m not learning Bc I don’t have a teacher.

Answers

Answer:

The output is:

0

2

4

Explanation:

First of all, the print statement must be indented with a tab, otherwise it is not part of the for loop.

The range(3) creates an array with values 0,1,2. The variable 'counter' gets those values one after another, and the print statement outputs this value doubled, hence the 0, 2 and 4 output.

Brainliest to right answer.
If you dare put an answer that does not relate to the question I swear.
Match the terms with their functions.
:)​

(2nd time posting this question)​

Answers

Answer:

1st is ambient noise

2nd is first person narration

3rd is dynamic microphone

4th is sound affects

5th is sound balance

6th is condenser microphone

Explanation:

hope this helped brainliest pls

The attenuation of a signal is -10 dB. What is the final signal power if it was originally
5 W?

Answers

Answer:

P₂ = 0.5 W

Explanation:

It is given that,

The attenuation of a signal is -10 dB.

We need to find the final signal power if it was originally  5 W.

Using attenuation for signal :

[tex]dB=10\text{log}_{10}(\dfrac{P_2}{P_1})[/tex]

Put dB = -10, P₁ = 5 W

Put all the values,

[tex]-10=10\text{log}_{10}(\dfrac{P_2}{5})\\\\-1=\text{log}_{10}(\dfrac{P_2}{5})\\\\0.1=\dfrac{P_2}{5}\\\\P_2=5\times 0.1\\\\P_2=0.5\ W[/tex]

So, the final signal power is 0.5 W.

The final signal power if it was originally 5W is; 0.5 W

Signal Power

We are given;

Attenuation signal; dB = -10 dBOriginal signal power; P1 = 5 W

Formula for attenuation signal is;

dB = 10log_10_ (P2/P1)

Where P2 is final signal power

Thus;

-10 = 10log_10_(P2/5)

-10/-10 = log_10_(P2/5)

-1 = log_10_(P2/5)

0.1 = P2/5

P2 = 0.1 × 5

P2 = 0.5 W

Read more about signal power at; https://brainly.com/question/13315405

True or false?
as the speed of a vehicle increases the amount of tire tread touching the road also increase.

Answers

True
Hope this is right and have a great day!

Write a method called isMagicSquare that accepts a two-dimensional array of integers as a parameter and returns true if it is a magic square. A square matrix is a magic square if it is square in shape (same number of rows as columns, and every row the same length), and all of its row, column, and diagonal sums are equal. For example, [[2, 7, 6], [9, 5, 1], [4, 3, 8]] is a magic square because all eight of the sums are exactly 15.

Answers

Answer:

def isMagicSquare(myArray: list) -> bool :

   row_num = len(myArray)

   cols_num = [len(x) for x in myArray]

   count =0

   for x in cols_num:

       if row_num == x:

           count += 1

   if count == len(cols_num):

       return True

   else:

       return False

print(isMagicSquare([[1,2,3,1],[3,34,2,4],[43,5,7,5],[2,3,4,5]]))

Explanation:

In object-oriented programming, a method is a function defined in a class. Methods are actions that can be taken or executed in a class or to a class object.

The "isMagicSquare" is a python function or method in a class that returns true if a two array or list is a perfect square (same column and row length).

who here plays overwatch or paladins ps4? I'm getting overwatch soon and need people to play with. please don't report this.​

Answers

Answer:

I'm down to play

Explanation:

Any one know 23 24 25?

Answers

23- B
24- C
25- i’m not sure what it is but the definition to it is that it represents a range of text that has been deleted from a document. so which ever one is closest to it.

hurry i need help swear to god i will give brainliest not lying

Answers

Answer:

finding area of a circle

def area(radius):

   int(radius)

   formula = radius * radius * 3.14

   print(formula)

radius_input = int(input('Insert the radius of your circle: '))

area(radius_input)

hope this helped :D

Which line of code will move the raft to the Skykomish River?

class raft:
def __init__(self,capacity):
self.capacity = capacity
self.location = 'Gauley'
self.repairs = []


def moveRaft(self, newLocation):
self.location = newLocation
myRaft = raft(30)




A. myRaft.moveRaft(self,'Skykomish')​

B. myRaft.moveRaft('Skykomish')​

C. moveRaft('self, Skykomish')​

D. myRaft.moveRaft() = 'Skykomish'

Answers

Answer:

myRaft.moveRaft('Skykomish')​

Explanation:

myRaft = raft(30)

myRaft.moveRaft('Skykomish')

If you add the following line, you can see that the raft is now located on the Skykomish River.

myRaft.moveRaft('Skykomish')​ is the line of code will move the raft to the Skykomish River. Hence, option B is correct.

What is Skykomish River?

Given that the North and South Forks of the Skykomish Rivers pass through it, the Upper Sky Valley is a canoeist and angler's dream. The Sky Valley's world-class whitewater rapids are a great option if you're searching for a wilder ride than floating around or wading into many fishing holes.

The Skykomish River will be navigable from its mouth to the point where its north and south forks meet. There will be no impediments in the Snoqualmie River from its mouth to Snoqualmie Falls. As long as the fishery is open, which is anticipated to last until anglers are allowed to keep up to two coho salmon that are at least 12 inches in length.

Thus, option B is correct.

For more information about Skykomish River, click here:

https://brainly.com/question/29104642

#SPJ2

Create a php user defined function called MinMax. The function accepts two numbers as arguments and it returns the string: "The minimum number is x and the maximum number is y" where x and y are the minimum and the maximum numbers respectively. For example, if the numbers 20 and 4 are passed to the function MinMax, it should return the string:

Answers

Answer:

<?php

function MinMax($x,$y) {

 if($x > $y){

     echo("The minimum is ".$y." and the maximum number is ".$x);

 }

 else{

   echo("The minimum is ".$x." and the maximum number is ".$y);    

 }

}

MinMax(20,4);

?>

Explanation:

<?php

This defines the user function with two parameters x and y

function MinMax($x,$y) {

This checks if parameter x is greater than parameter y

 if($x > $y){

If yes, it prints x as the maximum and y as the minimum

     echo("The minimum is ".$y." and the maximum number is ".$x);

 }

If otherwised

 else{

If yes, it prints y as the maximum and x as the minimum

   echo("The minimum is ".$x." and the maximum number is ".$y);    

 }

}

This calls the function

MinMax(20,4);

?>

how ssd is better than normal sata and pata HDD​

Answers


The HDD offers high storage capacities at a low price, while the SSD provides blazing fast access speeds at a higher cost.

Most slide layouts include at least one ________ by default.
Question 2 options:

placeholder

action button

transition

animation

Answers

Hey

I think that the answer placeholder :)

Sry if im wrong tho

Answer:

The answer is placeholder.

A __ consists of wires connecting the CPU and other parts of the computer. The __ transfers the data between the CPU and the memory unit.

Answers

Answer: A BUS consists of wires connecting the CPU and other parts of the computer. The DATA BUS transfers the data between the CPU and memory unit.
Explanation: PLATO

What is a router?
1. a special computer designed to accomplish tasks
2. a device that sends data to the receiving device
3. a set of data sent across networks
4. an Internet site available only to members of a group

Answers

Answer:

3

Explanation:

Answer:

it would be 3

Explanation:

because origanally a router is a dwvice that forwards data packets between computer networks.

Write a program that reads a list of integers into a list as long as the integers are greater than zero, then outputs the smallest and largest integers in the list.

Ex: If the input is:

10
5
3
21
2
-6
the output is:

2 and 21

Answers

n = 1

lst = []

while n > 0:

   lst.append(n := int(input()))

lst.pop(-1)

print(str(min(lst)) +" and "+str(max(lst)))

I wrote this code in python 3.8. I hope this helps




Predict the output
int ma3, n = 5, p=4
if(m==n&&n!=p)
{
System.out.println (m*n) ;
system.out.println(n%p);
}
if (m!=n) " (n==p)

System, out println (m+n)
System.out printen (m-n))
}​

Answers

Answer:

the output will be "hello word"

Name the application used for creating Presentations___
1.MS PowerPoint
2.MS Word
3MS Excel

Answers

Keynote is great for presentation

Answer:

1.MS PowerPoint

If I am working in a document and wish to follow a hyperlink, what should I do?
Copy the link and paste it in your web browser.
Hold the Control key and click on the link.
Click on the link.
Select Ctrl+K.

Answers

Answer:

Click on the link or copy and paste it to your browser

Explanation:

Other Questions
The flow of air caused by blend in the blank creates distant blank on earth surface Which trait is unique to birds?FlightWingsEndothermicFeathers Swedish researchers concluded that viewing and discussing art soothes the soul and helps relieve medical conditions such as high blood pressure and constipation. This conclusion was based on a study in which 10 elderly women gathered once a week to discuss different works of art. The study also included a control group of 10 elderly women who met once a week to discuss their hobbies and interests. At the end of 4 months, the art discussion group was found to have a more positive attitude, to have lower blood pressure, and to use fewer laxatives than the control group.(a) Why would it be important to determine if the researchers assigned the women participating in the study at random to one of the two groups?i) Assigning women at random ensures that the two groups are comparable.ii) Assigning women at random satisfies the conditions of a single-blind experiment. iii) Assigning women at random is not important for the study and can be neglected.(b) Explain why you think that the researchers included a control group in this study.i) A control group is absolutely unnecessary hereii) A control group allows the experiment to be conducted once more if the first attempt failed. iii) A control group is used to increase the size of the sampleiv) A control group provides a baseline for comparisons to determine treatment effects. What does this suggest about the experiences of white, wealthy women during the me period? Would you need circumference or area to find the amount of oil it takes to cover the bottom of a frying pan? Translatory motion and Circular motion difference between Whats the slope and y intercept of (3,4) and (0,-3) Is this inequality true? I -4 I > -4 ? re-word this We have boasted the protection of Great Britain without considering that her motive was interest, not attachment; and that she did not protect us from our enemies on our account, but from her enemies on her own account help please i will give brainlyest to the person with the answer please In IJK, K J, IJ = 9 and JK = 10. Find the length of KI. finish the table and write the equation Select the correct answer.Which function has the same zeros as g(x) = -x3 + x2 + 12x?. .y-30-20101-10-8-6-4-26810-1020 What is the name given to the group 0 elements Sharing contacts is different from sharing a calendar. Use the drop-down menus to explain how.1. You can share contacts withoutside the organization without publishing online.2. You are not able to that somebody share their contacts with you.3. Both calendars and contacts are shared in emails. For the latter, the recipient clicksand selects from a list. What is gross income? Gross income is money earned before taxes are taken from a paycheck. Gross income is money earned after taxes are taken from a paycheck. Gross income is money paid to fund firefighters and police officers. Gross income is money paid for taxes. Choose a person, event, or idea from the text. Explain what the text reveals about your chosen topic. Support your position with TWO pieces of evidence from the text. Pandemic and strife prompt "resilienc y" funds in Black communities What is the Y-intercept of the graph of the linear function? What is the slope? Select the correct answer.Which equation represents the vertical line passing through (1,-9)?A. x = -9B. x = 1C. y = -9D. y = 1 PromptChoose a fictional narrative that you know well, be it a film or a book or a short story, and analyze its plot within the structure of the Hero'sJourney. Choose at least one of Campbell's stages to analyze relative to the plot of your selection. Be specific in your summary of the narrative,as well as your references to the Hero's Journey stages and Munson's analysis.need help with this prompt its due today by 8pm at least page essay