Answer:
The program is as follows:
import random
print("Rock\nPaper\nScissors")
points = int(input("Points to win the game: "))
player_point = 0; computer_point = 0
while player_point != points and computer_point != points:
computer = random.choice(['Rock', 'Paper', 'Scissors'])
player = input('Choose: ')
if player == computer:
print('A tie - Both players chose '+player)
elif (player.lower() == "Rock".lower() and computer.lower() == "Scissors".lower()) or (player.lower() == "Paper".lower() and computer.lower() == "Rock".lower()) or (player == "Scissors" and computer.lower() == "Paper".lower()):
print('Player won! '+player +' beats '+computer)
player_point+=1
else:
print('Computer won! '+computer+' beats '+player)
computer_point+=1
print("Player:",player_point)
print("Computer:",computer_point)
Explanation:
This imports the random module
import random
This prints the three possible selections
print("Rock\nPaper\nScissors")
This gets input for the number of points to win
points = int(input("Points to win the game: "))
This initializes the player and the computer point to 0
player_point = 0; computer_point = 0
The following loop is repeated until the player or the computer gets to the winning point
while player_point != points and computer_point != points:
The computer makes selection
computer = random.choice(['Rock', 'Paper', 'Scissors'])
The player enters his selection
player = input('Choose: ')
If both selections are the same, then there is a tie
if player == computer:
print('A tie - Both players chose '+player)
If otherwise, further comparison is made
elif (player.lower() == "Rock".lower() and computer.lower() == "Scissors".lower()) or (player.lower() == "Paper".lower() and computer.lower() == "Rock".lower()) or (player == "Scissors" and computer.lower() == "Paper".lower()):
If the player wins, then the player's point is incremented by 1
print('Player won! '+player +' beats '+computer)
player_point+=1
If the computer wins, then the computer's point is incremented by 1
else:
print('Computer won! '+computer+' beats '+player)
computer_point+=1
At the end of the game, the player's and the computer's points are printed
print("Player:",player_point)
print("Computer:",computer_point)
Analyzing the role of elements in audio editing and Video
+ analyzing the role of the visual element in Video + analyzing the role of text factor
+ analyzing the role of the audio factor
+ analyzing the role of the transfer scene
+ analysing the role of the audio visual effects
Answer:
Analyzing the role of elements in audio editing and Video
+ analyzing the role of the visual element in Video + analyzing the role of text factor
+ analyzing the role of the audio factor
+ analyzing the role of the transfer scene
+ analysing the role of the audio visual effect
e) Point out the errors( if any) and correct them:-
class simple
{
inta,b,c;
double sumNumber
{
int d = a + b + c;
double e = d/5.6;
return e;
}
void show Number()
{
a = 10, b = 20, c=5;
System.out.println(d);
double f = sumNumber(a,b,c);
System.out.print(e);
}
}
Explanation:
double e-d/5.6;is wrong it should return to c
Write a recursive function named is_decreasing that takes as its parameter a list of numbers. It should return True if the elements of the list are strictly decreasing (each element in the array is strictly less than the previous one), but return False otherwise.
Answer:
c
Explanation:
3. Using Assume the following list of keys: 36, 55, 89, 95, 65, 75, 13, 62, 86, 9, 23, 74, 2, 100, 98 This list is to be sorted using the quick sort algorithm as discussed in this chapter. Use pivot as the middle element of the list. a. Give the resulting list after one call to the function partition. b. What is the size of the list that the function partition partitioned
Answer:
a. 36, 55, 13, 9, 23, 2, 62, 86, 95, 65,74, 75, 100, 98, 89
b. 15
Explanation:
Write a program that asks the user to enter in a username and then examines that username to make sure it complies with the rules above. Here's a sample running of the program - note that you want to keep prompting the user until they supply you with a valid username:
user_in = input ("Please enter your username: " )
if user_in in "0123456789":
print ("Username cannot contain numbers")
elif user_in in "?":
print ("Username cannot continue special character")
else:
print (" Welcome to your ghetto, {0}! ".format(user_in))
Code Example 17-1 class PayCalculator { private: int wages; public: PayCalculator& calculate_wages(double hours, double wages) { this->wages = hours * wages; return *this; } double get_wages() { return wages; } }; (Refer to Code Example 17-1.) What coding technique is illustrated by the following code? PayCalculator calc; double pay = calc.calculate_wages(40, 20.5).get_wages(); a. self-referencing b. function chaining c. dereferencing d. class chaining
Answer:
The answer is "Option b".
Explanation:
Function chaining is shown by this code, as the functions are called one after the other with one statement. Whenever you want to call a series of methods through an object, that technique is beneficial. Just because of that, you may give the same effect with less code and have a single given value only at top of the leash of operations.
By Using the following schema, answer the following SQL queries and commands: Product(P_code.P_name, P_price, P_on_hand,vend_code) Vender(vend_code, vend_fname, vend_areacode, vend_phone) 1- find the venders names who sell products in TN-5 area and their names include "dan". 2- find the code, name and vender code of product that has price between 1500S and 2500S and the product that has price between 48005 and 5600S. 3- Find the name, and code of venders who had 5 microwaves that has price less than 3500S. 4- Find the phone numbers of venders who sell Televisions. 5- Delete the records of venders who their first name is 'smith'
Explanation:
answer me pls i need sol bbbd
What do you do if your computer dies/malfunctions? Reboot (Restart) Shut Down Recovery CD and Recover your system Call a person to fix it
Answer:
Restart
Explanation:
Simply I may restart my pc if it dies/malfunctions. I'll not restart immediately, I'll wait for an hour and do restart my computer. If it doesn't work then maybe I'll Call a person to fix it.
T
N
O
?
You can insert only the row
only to
True or false
false
Explanation:
good luck bro
have a great day
Answer:
false
Explanation:
explain the working principle of computer? can anyone tell
Answer:
input process and output hehe
An engineer is configuring AMP for endpoints and wants to block certain files from executing. Which outbreak control method is used to accomplish this task
Question Completion with Options:
A. device flow correlation
B. simple detections
C. application blocking list
D. advanced custom detections
Answer:
The outbreak control method that is used to accomplish the task of configuring AMP for endpoints and to block certain files from executing is:
C. application blocking list
Explanation:
The application blocking list creates a list of application files, which the AMP continuously tracks and analyzes to compare the file activities with previous cyber attacks. Specifically, the AMP for Endpoints is a cloud-managed endpoint security solution, which provides a retrospective alert to prevent cyber-security threats, and rapidly detects, contains, and remediates malicious files on the endpoints.
continuously tracks and analyzes files and file activities across your systems, and compares these events to what preceded or happened in past attacks. If a file exhibits malicious behavior, the AMP provides you with a retrospective alert which enables you to stop a potential threat from succeeding.
What is system software? Write its types.
Answer:
There are two main types of software: systems software and application software. Systems software includes the programs that are dedicated to managing the computer itself, such as the operating system, file management utilities, and disk operating system (or DOS)
Answer:
There are two main types of software: systems software and application software. Systems software includes the programs that are dedicated to managing the computer itself, such as the operating system, file management utilities, and disk operating system (or DOS)
Explanation:
thanks for question
Neymar machine that Run on electricity
"Neymar" = "name a"?
if so, well, there are many, like the little glowing box you use the type questions to the brainliest community, let it be a phone, a pc, or a molded Nintendo
if you meant Neymar indeed, I'm not sure if he runs on electricity, unless he is a soccer playing android somehow.
Fasilitas untuk pengaturan batas kertas pada Microsoft Word adalah….
a. Margin
b. View
c. LayOut
d. Paragraph
Office 92 sering disebut juga dengan….
a. Office 3.0
b. Office 7.0
c. Office Xp
d. Office 2.0
Fasilitas untuk pengaturan batas kertas pada Microsoft Word adalah
B.View
Office 92 sering disebut juga dengan
A.Office 3.0
tinh S(n) = 1+2+3+.....+n
Answer:
-1/12
Explanation:
[tex]\sum_{k=0}^{k=n} k = \frac{n(n+1)}{2}\\[/tex]
look up the derivation by Srinivasa Ramanujan for a formal proof.
The advantage of returning a structure type from a function when compared to returning a fundamental type is that a. the function can return multiple values b. the function can return an object c. the function doesn’t need to include a return statement d. all of the above e. a and b only
Answer:
The advantage of returning a structure type from a function when compared to returning a fundamental type is that
e. a and b only.
Explanation:
One advantage of returning a structure type from a function vis-a-vis returning a fundamental type is that the function can return multiple values. The second advantage is that the function can return can an object. This implies that a function in a structure type can be passed from one function to another.
You are consulting with another medium sized business regarding a new database they want to create. They currently have multiple normalized source databases that need consolidation for reporting and analytics. What type of database would you recommend and why
Answer:
The enormous amount of data and information that a company generates and consumes today can become an organizational and logistical nightmare. Storing data, integrating it and protecting it, so that it can be accessed in a fluid, fast and remote way, is one of the fundamental pillars for the successful management of any company, both for productive reasons and for being able to manage and give an effective response to the customers.
Good big data management is key to compete in a globalized market. With employees, suppliers and customers physically spread across different cities and countries, the better the data is handled in an organization, the greater its ability to react to market demand and its competitors.
Databases are nowadays an indispensable pillar to manage all the information handled by an organization that wants to be competitive. However, at a certain point of development in a company, when growth is sustained and the objective is expansion, the doubt faced by many managers and system administrators is whether they should continue to use a database system, or if they should consider the leap to a data warehouse. When is the right time to move from one data storage system to another?
2. Which property is used for hiding text of the textbox?
a) Password Char b) Text Char c) Char Password d) Pass Char
Answer:
password char
Explanation:
The password char property allows the text being written in the textbox to be hidden in the form of dots or stars. As such the user entering the password is secure, as no one nearby can know the password by watching the texts.
How to use the AI System ?
ANSWER:
· New artificial intelligence systems are being developed to help teachers administer more effective testing that could uncover some of these often-hidden conditions. Once they can be properly identified, educators can tap into the resources available for a learning disability. Students can use AI to give reliable feedback.
An engineer is designing an HTML page and wants to specify a title for the browser tab to display, along with some meta data on what tools the page should use. These items would best fit in which of the following sections
a. The element
b. The element
c. The
element
d. The
An HTML is made up of several individual tags and elements such as the head, body. form, frame and many more.
In an HTML page, the meta element and the title element are placed in the head element.
An illustration is as follows:
< head >
< title > My Title < /title >
< meta charset="UTF-8" >
< / head >
The head element contains quite a number of elements and tags; some of them are:
metatitle stylescriptbaseAnd so on.
Hence, in order to use a meta-data element, the meta element has to be placed within the head element.
Read more about HTML elements at:
https://brainly.com/question/4484498
What are some 5 constraints in using multimedia in teaching
Answer:
Explanation:
Technological resources, both hardware and software
Technological skills, for both the students and teacher
Time required to plan, design, develop, and evaluate multimedia activities
Production of multimedia is more expensive than others because it is made up of more than one medium.
Production of multimedia requires an electronic device, which may be relatively expensive.
Multimedia requires electricity to run, which adds to the cost of its use
There are constraints in using multimedia in teaching; The Technological resources, both hardware and software Also, Technological skills, for both the students and teacher
What is a characteristic of multimedia?
A Multimedia system has four characteristics and they are use to deliver the content as well as the functionality.
The Multimedia system should be be computer controlled. The interface is interactive for their presentation and lastly the information should be in digital.
There are constraints in using multimedia in teaching;
The Technological resources, both hardware and software
Also, Technological skills, for both the students and teacher
Since Time required to plan, design, develop, and evaluate multimedia activities
The Production of multimedia is more expensive than others because it is made up of more than one medium.
The Production of multimedia requires an electronic device, which may be relatively expensive.
The Multimedia requires electricity to run, which adds to the cost of its use.
Learn more about multimedia here;
https://brainly.com/question/9774236
#SPJ2
Compute the acceleration of gravity for a given distance from the earth's center, distCenter, assigning the result to accelGravity. The expression for the acceleration of gravity is: (G * M) / (d2), where G is the gravitational constant 6.673 x 10-11, M is the mass of the earth 5.98 x 1024 (in kg) and d is the distance in meters from the earth's center (stored in variable distCenter).
#include
using namespace std;
int main() {
double G = 6.673e-11;
double M = 5.98e24;
double accelGravity;
double distCenter;
cin >> distCenter;
/* Your solution goes here */
cout << accelGravity << endl;
return 0;
}
Answer:
Replace /* Your solution goes here */ with the following expression
accelGravity = (G * M) / (distCenter *distCenter );
Explanation:
Required
Complete the code
The equivalent expression of (G * M) / (d^2) is:
(G * M) / (distCenter *distCenter );
The expression must be stored in accelGravity.
So, we have:
accelGravity = (G * M) / (distCenter *distCenter );
advantages of computational skill
Explanation:
algorithmic thinking - developing a set of instructions or sequence of steps to solve a problem;
evaluation - ensuring a solution is fit-for-purpose;
decomposition - breaking a problem down into its component parts;
Write a program that randomly chooses among three different colors for displaying text on the screen. Use a loop to display 20 lines of text, each with a randomly chosen color. The probabilities for each color are to be as follows: white 30%, blue 10%, green 60%. Suggestion: Generate a random integer between 0 and 9. If the resulting integer falls in the range 0 to 2 (inclusive), choose white. If the integer equals to 3, choose blue. If the integer falls in the range 4 to 9 (inclusive), choose green. Test your program by running it ten times, each time observing whether the distribution of line colors appears to match the required probabilities.
INCLUDE Irvine32.inc
.data
msgIntro byte "This is Your Name's fourth assembly extra credit program. Will randomly",0dh,0ah
byte "choose between three different colors for displaying twenty lines of text,",0dh,0ah
byte "each with a randomly chosen color. The color probabilities are as follows:",0dh,0ah
byte "White=30%,Blue=10%,Green=60%.",0dh,0ah,0
msgOutput byte "Text printed with one of 3 randomly chosen colors",0
.code
main PROC
;
//Intro Message
mov edx,OFFSET msgIntro ;intro message into edx
call WriteString ;display msgIntro
call Crlf ;endl
call WaitMsg ;pause message
call Clrscr ;clear screen
call Randomize ;seed the random number generator
mov edx, OFFSET msgOutput;line of text
mov ecx, 20 ;counter (lines of text)
L1:;//(Loop - Display Text 20 Times)
call setRanColor ;calls random color procedure
call SetTextColor ;calls the SetTextColor from library
call WriteString ;display line of text
call Crlf ;endl
loop L1
exit
main ENDP
;--
setRanColor PROC
;
; Selects a color with the following probabilities:
; White = 30%, Blue = 10%, Green = 60%.
; Receives: nothing
; Returns: EAX = color chosen
;--
mov eax, 10 ;range of random numbers (0-9)
call RandomRange ;EAX = Random Number
.IF eax >= 4 ;if number is 4-9 (60%)
mov eax, green ;set text green
.ELSEIF eax == 3 ;if number is 3 (10%)
mov eax, blue ;set text blue
.ELSE ;number is 0-2 (30%)
mov eax, white ;set text white
.ENDIF ;end statement
ret
setRanColor ENDP
Write a program that repeatedly accepts as input a string of ACGT triples and produces a list of the triples and the corresponding amino acids, one set per line. The program will continue to accept input until the user just presses ENTER without entering any DNA codes.
Answer:
Explanation:
The following code is written in Python. I created a dictionary with all the possible gene combinations and their corresponding amino acids. The user then enters a string. The string is split into triples and checked against the dictionary. If a value exists the gene and amino acid is printed, otherwise an "Invalid Sequence" error is printed for that triple. The program has been tested and the output can be seen in the attached image below.
def printAminoAcids():
data = {
'TTT': 'Phe', 'TCT': 'Ser', 'TGT': 'Cys', 'TAT': 'Tyr',
'TTC': 'Phe', 'TCC': 'Ser', 'TGC': 'Cys', 'TAC': 'Tyr',
'TTG': 'Leu', 'TCG': 'Ser', 'TGG': 'Trp', 'TAG': '***',
'TTA': 'Leu', 'TCA': 'Ser', 'TGA': '***', 'TAA': '***',
'CTT': 'Leu', 'CCT': 'Pro', 'CGT': 'Arg', 'CAT': 'His',
'CTC': 'Leu', 'CCC': 'Pro', 'CGC': 'Arg', 'CAC': 'His',
'CTG': 'Leu', 'CCG': 'Pro', 'CGG': 'Arg', 'CAG': 'Gln',
'CTA': 'Leu', 'CCA': 'Pro', 'CGA': 'Arg', 'CAA': 'Gln',
'GTT': 'Val', 'GCT': 'Ala', 'GGT': 'Gly', 'GAT': 'Asp',
'GTC': 'Val', 'GCC': 'Ala', 'GGC': 'Gly', 'GAC': 'Asp',
'GTG': 'Val', 'GCG': 'Ala', 'GGG': 'Gly', 'GAG': 'Glu',
'GTA': 'Val', 'GCA': 'Ala', 'GGA': 'Gly', 'GAA': 'Glu',
'ATT': 'Ile', 'ACT': 'Thr', 'AGT': 'Ser', 'AAT': 'Asn',
'ATC': 'Ile', 'ACC': 'Thr', 'AGC': 'Ser', 'AAC': 'Asn',
'ATG': 'Met', 'ACG': 'Thr', 'AGG': 'Arg', 'AAG': 'Lys',
'ATA': 'Ile', 'ACA': 'Thr', 'AGA': 'Arg', 'AAA': 'Lys'
}
string = input("Enter Sequence or just click Enter to quit: ")
sequence_list = []
count = 0
gene = ""
for x in range(len(string)):
if count < 3:
gene += string[x]
count += 1
else:
sequence_list.append(gene)
gene = ""
gene += string[x]
count = 1
sequence_list.append(gene)
for gene in sequence_list:
if gene.upper() in data:
print(str(gene.upper()) + ": " + str(data[gene.upper()]))
else:
print(str(gene.upper()) + ": invalid sequence")
printAminoAcids()
I connected to an external hard drive to transfer some photos from my vacation. When I try to drag the photo, it bounces right back and does not transfer. What is the likely cause of this issue?
a. hard drive is full
b. photos were taken in a different country
c. USB port is broken
d. the file structure of the 2 hard drives are not compatible
The answer is D, What is the likely cause of this issue is that the file structure of the two hard drives are not compatible.
The file structure or file system, of a hard drive, tells the disk how to read, write and store information on the drive. Some file systems do not allow the disk to store any files and often do not display error messages. If we try to drag a file onto a hard drive with this kind of file structure, the action would simply not be performed. This can be fixed by formatting the disk partition into a new file system.
Option B states that the issue may be that the photos were taken in a different country. This is not the cause of the problem because regardless of where the pictures are taken, they are all stored in common formats such as:
JPEGPNGJFIFAny external hard drive capable of storing images will have the ability to receive files in these formats as well as many other image formats. For this reason, option B is False.
The question states that you were able to connect the external Hard drive and drag files onto it, though unsuccessfully. This tells us that the USB port is working as intended, if it were not working, it would not display the Hard drive onto the computer and we would not be able to drag files to it. Therefore, option C is false
Insufficient Hard drive storage space is a common issue in not being able to transfer files between hard drives. However, if this were the case, the user would be shown a message displaying the error. The message may look like:
"Insufficient space on the disk.""The Disk is full.""Not enough memory to complete this action"The exact wording may vary depending on the operating system in use. Since the question states that the files simply "bounces back" without an error message displaying, we can infer that option A is false.
For more help with Hard drive issues see: https://brainly.com/question/14254444?referrer=searchResults
How to prepare and draw a corresponding flowchart to compute the sum and product of all prime numbers between 1 and 50
Answer:
Create boxes with the following content
Initialize sum to 0, product to 1 and number to 1Check if number is a prime. If yes, update sum += number and product *= numberIncrease number by 1If number is <= 50, go back to "check" block.The check block has a diamond shape.
At the "yes" branch of the check block, you can create separate blocks for updating the sum and the product.
Connect the blocks using arrows.
Indicate the start and the end of the flow using the appropriate symbols.
The block to check if a number is a prime you could further decompose into the steps needed to do such a check.
what are the functions of language in logic?
Answer:
Three basic functions of language: Informative, Expressive, and Directive Language
Informative language. Simply put, informative language can be looked at as though it is either right or wrong, or true or falseExpressive languageDirective languageIf every company is now a technology company, then what does this mean for every student attending a business college
Answer:
Explanation:
There are all sorts of possibilities for, say, inserting new technologies into existing processes. But most of these improvements are incremental. They are worth doing; in fact, they may be necessary for survival. No self-respecting airline, for instance, could do without an application that lets you download your boarding pass to your mobile telephone. It saves paper, can't get lost and customers want it.
But while it's essential to offer applications like the electronic boarding pass, those will not distinguish a company. Electronic boarding passes have already been replicated by nearly every airline. In fact, we've already forgotten who was first.
To nest one structure within another structure, you a. define both structures and then create a data member of the nested structure type within the other structure b. create a container that holds objects of the nested structure type and then include the container within another structure c. define the nested structure within another structure
Answer:
Hence the correct option is option a) define both structures and then create a data member of the nested structure type within the other structure.
Explanation:
To make Address nested to Employee, we've to define Address structure before and out of doors Employee structure and make an object of Address structure inside Employee structure.
For example, we may need to store the address of an entity employee in a structure.