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
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
When save a newly created template, you use which extension for the file type? .doc, .docx, .doct, .dotx?
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
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?
How much data can a flash drive store?
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
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
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
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.
Please help this computer science question(Pseudocode and Trace table)
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
Answer:
Rear bumper cover
Explanation:
4.8 Code Practice: Question 1
I need help
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.
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.
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)
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?
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 PowerWe are given;
Attenuation signal; dB = -10 dBOriginal signal power; P1 = 5 WFormula 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.
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.
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.
Answer:
I'm down to play
Explanation:
Any one know 23 24 25?
hurry i need help swear to god i will give brainliest not lying
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'
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:
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
Most slide layouts include at least one ________ by default.
Question 2 options:
placeholder
action button
transition
animation
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.
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
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
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))
}
Answer:
the output will be "hello word"
Name the application used for creating Presentations___
1.MS PowerPoint
2.MS Word
3MS Excel
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.
Answer:
Click on the link or copy and paste it to your browser
Explanation: