In programming, the keyword "static" is used to define a class-level variable or method that belongs to the class itself rather than individual instances (objects) of the class. Here are the key aspects of using static:
1. Static Variables: A static variable is shared among all instances of a class. It is associated with the class itself, not with specific objects. Static variables are declared with the "static" keyword and can be accessed using the class name. For example:
```java
class MyClass {
static int count;
}
```
Here, the variable "count" is shared by all instances of the class "MyClass". You can access it using "MyClass.count".
2. Static Methods: A static method belongs to the class, not to individual objects. It can be called using the class name, without the need to create an instance of the class. Static methods cannot access instance variables directly, as they do not belong to any specific object. For example:
```java
class MyClass {
static void printMessage() {
System.out.println("Hello, World!");
}
}
```
You can call the static method "printMessage" using "MyClass.printMessage()".
When to Use Static:
- When you want to share data or behavior among all instances of a class.
- When you want to define utility methods that do not require access to instance variables.
- When you want to define constants that do not change their value.
When Not to Use Static:
- When you need different values for each instance of a class.
- When you want to access instance-specific data or methods.
- When you need to override a method, as static methods cannot be overridden.
It's important to use static appropriately based on the specific requirements of your program. Overuse of static can lead to code that is harder to maintain and test, as it can introduce dependencies and make it more difficult to manage state.
Learn more about Static Variables here: https://brainly.com/question/32563222
#SPJ11
Which of the constraints listed below would be considered a physical constraint
-Materials
-Demand for product
-Timeline
-Cost
write a statement that calls the function increaseitemqty with parameters notebookinfo and addqty. assign notebookinfo with the value returned.
The programme uses the parameters notebookinfo and addqty to run the function increaseitemqty, then assigns notebookinfo the value received.
Explain the term "function calling"?When calling a function is necessary, it is invoked inside of a program. Only in a program's main() method is it called by its name. The parameters can be passed to a function that is called from the main() function.#include <iostream>
#include <string>
using namespace std;
struct ProductInfo {
string itemName;
int itemQty;
};
ProductInfo IncreaseItemQty(ProductInfo productToStock, int increaseValue) {
productToStock.itemQty = productToStock.itemQty + increaseValue;
return productToStock;
}
int main() {
ProductInfo notebookInfo;
int addQty;
cin >> notebookInfo.itemName >> notebookInfo.itemQty;
cin >> addQty;
/* Your code goes here */
cout << "Name: " << notebookInfo.itemName << ", stock: " << notebookInfo.itemQty << endl;
return 0;
}
Thus, the program uses the parameters notebookinfo and addqty to run the function increaseitemqty, then assigns notebookinfo the value received.
To know more about the function calling, here
https://brainly.com/question/25741060
#SPJ4
The computer code behind password input can be modified to force people to change their password for security reasons. This is known as “password expiration,” and some websites and companies use it regularly. However, people tend to choose new passwords that are too similar to their old ones, so this practice has not proven to be very effective (Chiasson & van Oorschot, 2015). Your friends have a hard time remembering passwords. What method can you devise for them so that they can remember their new passwords AND make them very different from the old ones?
Answer:
to remember the passwords you could either make a little rhyme to "help" remember it or you could be like everyone else and write it down on a piece of paper. you could also write the password over and over again to make it stick. a way to make a password different from an old one is to use completely different wording and completely different numbers.
Explanation:
Answer:
B
Explanation:
got it right
Your Python program has this code.
for n = 1 to 10:
position = position + 10 # Move the position 10 steps.
direction = direction + 90 # Change the direction by 90 degrees.
You decided to write your program in a block programming language.
What is the first block you need in your program?
wait 10 seconds
Repeat forever
Repeat 10 times
Stop
The first block needed in the program would be “Repeat 10 times”The given code is iterating through a loop 10 times, which means the code is running 10 times, and the block programming language is an approach that represents the programming code as blocks that are easy to understand for beginners.
It is a drag-and-drop environment that uses blocks of code instead of a programming language like Python or Java. This type of programming language is very popular with young programmers and is used to develop games, mobile applications, and much more.In block programming languages, a loop is represented as a block.
A loop is a sequence of instructions that is repeated several times, and it is used when we need to execute the same code several times. The first block needed in the program would be “Repeat 10 times”.It is essential to learn block programming languages because it provides a lot of benefits to beginners.
For instance, it is user-friendly, easy to learn, and uses visual blocks instead of lines of code. It helps beginners to understand how programming works, and it also helps them to develop their programming skills.
For more such questions on program, click on:
https://brainly.com/question/23275071
#SPJ8
By buying in bulk, Deborah managed to have 6,000 CDs manufactured for $9,000. What was the cost per unit for manufacturing?
Answer: It would be $1.50 per unit
Explanation
For this assignment, you will create a calendar program that allows the user
to enter a day, month, and year in three separate variables as shown below.
Day:
Month:
Year:
Then, your program should ask the user to select from a menu of choices
using this formatting
Menu:
1) Calculate the number of days in the given month.
2) calculate the number of days left in the given year.
I would really appreciate it if someone could help me on this.
Following are the program to the given question:
Program Explanation:
Defining three methods "leap_year, number_of_days, and days_left " is declared. In the "leap_year" method, it accepts the year variable, which calculates the year is the leap year and returns its value that is 1. In the next method "number_of_days", it is define which accepts the "year and month" variable in the parameter and calculate and returns its value. In the last "days_left" method, it calculates the left days and returns its value, and outside the method, two dictionary variable days_31 and days_30 is declared. It initilized a value by using 3 input variable "day, month, and year" variable which accepts user-input value. In the next step, a "c" variable is declared, that input values and calls and print its value accordingly.Program:
def leap_year(y):#defining a method leap_year that takes one parameter
l= 0#defining l variable that holds an integer
if y % 4 == 0:#using if block that check year value module by 4 equal to 0
l = 1#holding value in l variable
if y % 100 == 0:#using if block that check year value module by 100 equal to 0
l = 0#holding value in l variable
if y % 400 == 0:#using if block that check year value module by 400 equal to 0
l= 1#holding value in l variable
return l#return l value
def number_of_days(m, y):#defining a method number_of_days that takes two parameters
months = {1: 31, 3: 31, 4: 30, 5: 31, 6: 30, 7: 31, 8: 31, 9: 30, 10: 31, 11: 30, 12: 31}#defining months variable that hold value in ictionary
l = leap_year(y)#defining l variable that calls leap_year method and holds its value
if l == 1 and m == 2:#use if that check l value equal to 1 and 2
return 29#return value 29
if m == 2:#use if that check month value equal to 2
return 28#return value 29
return months[m]#return months value
def days_left(d, m, y):#defining a method days_left that takes three variable in parameter
l = leap_year(y)#defining l variable that hold leap_year method value
days = 0#defining days variable that hold integer value
months = {1: 31, 3: 31, 4: 30, 5: 31, 6: 30, 7: 31, 8: 31, 9: 30, 10: 31, 11: 30, 12: 31}#defining months variable that hold value in ictionary
if l== 1:#using if that check l equal to 1
if m > 2:#defining if that check m value greater than 2
days += (29 + 31)#using days variable that Calculate holds its value
i = m#defining i variable that holds months value
while i > 2:#defining while loop that checks other days
days += months[i]#defining a days variable that holds months value
i -= 1#decreasing i value
days -= (months[m] - d)#defining days that subtracts leap value
elif m == 2:#defining elif block that checks m equal to 2
days += (29 - d) + 31#holding value in days variable
else:#defining else block
days = 31 - d#Calculating days value
return 366 - days#using return keyword that Calculates days value
else:#defining else block
if m > 2:#using if that checks m value greater than 2
days += (28 + 31)#Calculating and store value in days
i = m#holding months value in i
while i > 2:#defining while loop that checks i value greater than 2
days += months[i]#holding list value in days
i -= 1#decreasing i value
days -= (months[m] - d)#defining days that subtracts leap value
elif m == 2:#using elif block that checks m value equal to 2
days += (28 - d) + 31#Calculating and store value in days
else:#defining else block
days = 31 - d##Calculating and store value in days
return 365 - days#return total days
print("Please enter a date")#print message
day = int(input("Day: "))#input value
month = int(input("Month: "))#input value
year = int(input("Year: "))#input value
print("Menu: ")#print message
print("1) Calculate the number of days in the given month.")#print message
print("2) Calculate the number of days left in the given year.")#print message
c = int(input())#input value
if c == 1:#using if that checks c value equal to 1
print(number_of_days(month, year))#calling method and print its return value
elif c == 2:#using if that checks c value equal to 2
print(days_left(day, month, year))#calling method and print its return value
Output:
Please find the attached file.
Learn more:
brainly.com/question/16728668
what is the most popular monitor
HELP PLEASE!
I dowloaded this app and it gave me a virus. DOES ANYONE HAVE ANY IDEA HOW TO DELETE IT? I have an apple laptop and I don't know how. My laptop send me a message telling me a have a virus and this laptop has MANY IMPORTANT FILES. PLEASE HELP ASAP. I'LL GIVE BRAINLIEST. DONT GIVE LINKS OR LEAVE IT BLANK.
Answer:
It probably is fake. Send me a screenshot. Also, just saying if it asks you to download a app of something, dont do it its just a scam to make you panic.
Explanation:
In an answer of at least two well-developed paragraphs, explain how the government
is involved in the circular flow of money and the circular flow of products.
Some dialog boxes and the backstage area contain a _____ button, labeled with a question mark (?).
Some dialog boxes and the backstage area contain a help button, labeled with a question mark.
What is a dialog box?A dialogue box can be defined as a pop-up menu that opens up as a temporary feature due to an application or required of an application.
The help option is appearing on a file that is depicted with a question mark describing that it contains all the information that the person will need or the queries that person is having, and it can solve the data which is being presented to them.
The help menu can even explain each and every feature that is present in the software.
Learn more about dialog box, here:
https://brainly.com/question/28445405
#SPJ1
What kinds of new input devices do you think might be invented in 10, 20, or 50 years? How might those devices change the world?
Answer: An input that can maybe act as a place to store your USB
Explanation:too many USB’s go missing so if there’s a storage area where it can be inputted and held it’ll be somewhere else so if it does go missing then it’ll be held on a tablet like device maybe ? Like a second I cloud
ALGUEM SABE COMO MUDA O NOME DE PERFIL!?!?!? SE SOUBER ME AJUDA!!
Answer:
The following are the steps to change the profile name.
Explanation:
In the given question it is not defined in which we change the profile name.so, we define the steps to change the profile name social media like (Face book).
first of all, login into your account with your id and password.After login go to the setting bar, this bar is available on the top right corner. After opening the setting go to the general setting option and open it.In the general setting option, It provides name, username, and contact options in these options we update the profile name. To update the profile name we click on the edit link in which it opens the edit panel. After writing the name select the save changes button to save the profile name.Answer:
MUDA DA MUDAAAA
Explanation:
Can speakers receive and send data?
Answer:
Depends.
Explanation:
If its a smart speaker, like Amazon Echo or Google Home, most likely yes. Especially since they have to communicate to other smart speakers if you have multiple. If you ask it questions, sometimes it pulls from its data banks to help answer it more accurately.
Answer:
CNCBN C FGB DHFJ NSJD
Explanation:
write a gui program named inchestocentimetersgui that allows the user to input a measurement in inches, click a button, and output the value in centimeters. there are 2.54 centimeters in an inch.
The term "GUI" (Graphical User Interface) refers to software programs that give users a visual way to interact with only an underlying system or application.
What is a GUI program in Python?An application with a graphical interface allows users to interact with it by using buttons, windows, and a variety of other widgets. A web browser would be a nice illustration. In addition to a primary window where all of the material loads, it features buttons and tabs.
What are 3 examples of a GUI?Examples of GUIs include computer monitors, mobile devices like smartphones and tablets, and gaming consoles.
To know more about GUI visit:
https://brainly.com/question/14758410
#SPJ4
How should you respond to the theft of your identity cyber awareness.
The way to respond to the theft of your identity cyber awareness is; To report the crime to the local commission which is the Federal Trade Commission (FTC).
Protection from Identity TheftIdentity Theft is basically a crime that happens happens when someone steals your personal information and uses it commit a fraudulent offence.
Now, the person that stole your identity may use the stolen information he got from you to apply for credit, file taxes, medical services or other government privileges.
The acts perpetuated above by the thief could lead to damage to your reputation with credit status and your good name too which could take years to rebuild.
Thus, it is very pertinent to report any case of such to the relevant government commission which in this case is Federal Trade Commission (FTC).
Read more about Identity Theft at; https://brainly.com/question/15252417
write a qbasic programming to calculate and display the total price of 100 pens if a pen costs Rs.20?
Answer:
2000
Explanation:
if one pen cost 20 then 100 pen=20×100=2000
my baby's always dancin' and it wouldn't be a bad thing
But I don't get no loving and that's no lie
We spent the night in Frisco at every kinda disco
From that night I kissed our love goodbye
Don't blame it on the sunshine
Don't blame it on the moonlight
Don't blame it on the good times
Blame it on the boogie
Don't blame it on the sunshine
Don't blame it on the moonlight
Don't blame it on the good times
Blame it on the boogie
That nasty boogie bugs me, but somehow how it has drugged me
Spellbound rhythm gets me on my feet
I've changed my life completely, I've seen the lightning leave me
And my baby just can't take her eyes off me
Don't blame it on the sunshine
Don't blame it on the moonlight
Don't blame it on the good times
Blame it on the boogie
Don't you blame it on the sunshine
Don't blame it on the moonlight
Don't blame it on the good times
Blame it on the boogie, woo
I just can't, I just can't
I just can't control my feet
I just can't, I just can't
I just can't control my feet
I just can't, I just can't
I just can't control my feet
I just can't, I just can't
I just can't control my feet
Sunshine
Don't blame it on the moonlight
Don't blame it on the good times
Blame it on the boogie
Don't blame it on the sunshine
Don't blame it on the moonlight
Don't on the good times
Blame it on the boogie
This magic music grooves me, that dirty rhythm fools me
The Devil's gotten to me through this dance
I'm full of funky fever, a fire burns inside me
Boogie's got me in a super trance
Don't blame it on the sunshine
Don't blame it on the moonlight
Don't blame it on the good times
Blame it on the boogie
Don't you blame it sunshine
Don't blame it on the moonlight
Don't blame it on the good times
Blame it on the boogie
Aow!
Sunshine
Hoo!
Moonlight
Yeah
Good times
Mmm!
Boogie
You just gotta sunshine
Yeah
Moonlight
Good times
Good times
Boogie
Don't you blame it sunshine
You just gotta moonlight
You just wanna good times
Yeah, oh boogie
Blame it on yourself
(Sunshine)
Ain't nobody's fault
(Moonlight)
But yours and that boogie
(Good times)
All night long
(Boogie)
Can't stop that boogie
(Sunshine)
Ain't nobody's fault
(Moonlight)
But yours and that boogie
(Good times)
Dancin' all night long
(Boogie)
Blame it on yourself
(Sunshine)
Ain't nobody's fault
(Moonlight)
But yours and that boogie, boogie, boogie
Answer: This isn't even a question.
Explanation: I have no idea how to answer these song lyrics.
What can be done to create new jobs in an economy where workers are increasingly being replaced by machines?
Answer:
Remove some machine by only giving the machines the works humans can not do and the ones humans can do should not be replaced by robots
Please write legibly or type. Show your nork to the extent possible.
1. Translate the high-level language code below into assembly instructions. The variables A, B, C, D, E and F are located in the memory and can be accessed by their label (e.g.. LOAD RI, A will load A from the memory into R1). Minimize the number of instructions in the assembly code that you write.
$$
F=(A+B)^*(C-D)(E-D)
$$
a) Write the code for an accumulator architecture
b) Write the code for a stack architecture. Assume that the division (subtraction) operation divides (subtracts) the topmost value in the stack by the second topmost value.
c) Write the code for a register-memory architecture
d) Write the code for a load-store architecture
e) Compare and count the number of instructions and memory accesses between the differem ISAs in the previous parts of the questions $({a}, {b}, {c}$ and ${d})$.
The translation of the high-level language code below into assembly instructions is given below:
The high-level language translationa) Accumulator Architecture:
LOAD A
ADD B
STORE TEMP1
LOAD C
SUB D
STORE TEMP2
LOAD E
SUB D
MUL TEMP2
STORE TEMP3
LOAD TEMP1
MUL TEMP3
STORE F
b) Stack Architecture:
PUSH A
PUSH B
ADD
PUSH C
PUSH D
SUB
PUSH E
PUSH D
SUB
MUL
MUL
POP F
c) Register-Memory Architecture:
LOAD R1, A
ADD R1, B
LOAD R2, C
SUB R2, D
LOAD R3, E
SUB R3, D
MUL R2, R2, R3
MUL R1, R1, R2
STORE F, R1
d) Load-Store Architecture:
LOAD R1, A
LOAD R2, B
ADD R3, R1, R2
LOAD R4, C
LOAD R5, D
SUB R6, R4, R5
LOAD R7, E
SUB R8, R7, R5
MUL R9, R6, R8
MUL R10, R3, R9
STORE F, R10
e) Comparison:
Accumulator: 13 instructions, 10 memory accesses.
Stack: 12 instructions, 6 memory accesses.
Register-Memory: 9 instructions, 6 memory accesses.
Load-Store: 11 instructions, 8 memory accesses.
Stack and Register-Memory architectures are more concise in this example, with Register-Memory having the fewest instructions.
Read more about computer architectures here:
https://brainly.com/question/30454471
#SPJ4
explain two ways of searching information using a search engine.
answer:
navigational search queries · for example, “how to make cake?”
informational search · for example, “y-o-u-t-u-b-e” or “apple"
explanation:
navigational — these requests establish that the user wants to visit a specific site or find a certain vendorinformational — in these instances, the user is looking for certain informationwhat is binary code?
Answer:Binary code, code used in digital computers, based on a binary number system in which there are only two possible states, off and on, usually symbolized by 0 and 1. ... In binary code, each decimal number (0–9) is represented by a set of four binary digits, or bits.
Explanation:
Brainliest
Answer:
binary code is a jumble of random 0s and 1s that forn chains that make up all coded systems on any electronic device
Explanation:
Saving a file as a new filename can be accomplished through the Save As dialog box.
True False
Answer:
True.
Explanation:
A dialog box is a small window that serves as a controlling element in computers. The name dialog box is suggestive that it is a window that helps the user to communicate and response with an answer.
There are several types of common dialog box such as open dialog box, save as dialog box, print dialog box, etc.
Save as dialog box is a window that enables the user to save a file with a new name and new location. Save as dialog box can be opened by going to the File menu and click Save as. After the Save as dialog box appears, the user is able to change file name, location, etc.
Thus the statement is true.
helium is a gas lighter than air that is used in balloons. the density of helium is
approximately 0.19 kilograms pel cubic meter. you get 15 helium balloons for
your 15th birthday, each with a volume of 15 cubic meters. how many
kilograms of helium do the balloons contain, to the nearest hundredth?
The balloons contain approximately 42.75 kilograms of helium, to the nearest hundredth.
To find out how many kilograms of helium the 15 balloons contain to the nearest hundredth, we can follow these ways:
1. Determine the density of helium: 0.19 kilograms per cubic meter.
2. Find the volume of one balloon: 15 cubic meters.
3. Calculate the total volume of helium for 15 balloons: 15 balloons x 15 cubic meters/balloon = 225 cubic meters.
4. Calculate the mass of helium in the balloons: Density x Volume = 0.19 kg/m³ x 225 m³ = 42.75 kg.
So, the 15 helium balloons for your 15th birthday, each with a volume of 15 cubic meters, contain approximately 42.75 kilograms of helium to the nearest hundredth.
To know more about Helium visit:
https://brainly.com/question/5596460
#SPJ11
the expected lifetime of a device given a specific operating environment is which recovery metric? a. mean time to repair or restore b. mean time between failures c. recovery time objective d. recovery point objective
The expected lifetime of a device given a specific operating environment is represented by the recovery metric "mean time between failures" (MTBF), measuring the average time between two consecutive failures of the device.
The expected lifetime of a device given a specific operating environment is best represented by the recovery metric called "mean time between failures" (MTBF). MTBF refers to the average time elapsed between two consecutive failures of a device in normal operating conditions. It is a measure of the device's reliability and indicates how long the device is expected to function before experiencing a failure.
MTBF is commonly used to estimate the expected lifespan of a device and assess its overall reliability. It helps manufacturers and users understand the average time they can expect a device to operate without requiring repair or replacement. A higher MTBF value suggests a more reliable device, as it indicates a longer average time between failures.
The other recovery metrics mentioned in the options are not specifically related to the expected lifetime of a device. Mean time to repair or restore (MTTR) measures the average time required to repair or restore a device after a failure has occurred.
Recovery time objective (RTO) represents the target time within which a system or service should be recovered following a disruption. Recovery point objective (RPO) defines the acceptable amount of data loss that can occur during a system or service recovery.
In summary, MTBF is the appropriate recovery metric to estimate the expected lifetime of a device in a specific operating environment.
Learn more about device:
https://brainly.com/question/28498043
#SPJ11
t/f it’s best practice to convert to srgb when saving for the web unless you have a specific reason not to.
Yes, it is true that one should convert image to sRGB when saving for the web unless you have a specific reason not to. The majority of devices can only reproduce colours from the sRGB colour space because it is the colour space that is used on the web.
For this reason, before exporting your finished modifications for the web, you should convert them to sRGB.
You might have seen different colour profile settings when using applications like Adobe Lightroom or Photoshop (also known as working spaces or colour spaces). In actuality, there are 16 possibilities available when you start a new document in Photoshop or select Edit > Color Settings > Working Spaces > RGB. But the top three options are as follows:
sRGBFlash RGB (1998)RGB ProPhotoTo achieve the finest colour representation of your image for the eyes of your visitors, you will need to choose one, but which one you select will rely on a number of factors.
To learn more about image click here:
brainly.com/question/13490668
#SPJ4
Give an E-R diagram for database showing fatherhood, motherhood and spouse relationship among men and women.
An Entry Relationship (ER) data model is a type of data model that is used to represent the relationships between entities in a database.
What is database?A database is a collection of organized data, stored and accessed electronically. Databases provide a structure for storing and organizing data that is easily accessed, managed and updated.
It is a type of logical data model that is used to illustrate the logical relationships between entities in a database. An ER diagram is a graphical representation of an ER data model.
Below is an ER diagram for a database showing fatherhood, motherhood and spouse relationship among men and women:
Fatherhood Relationship:
Father -----------------------------> Son/Daughter
Motherhood Relationship:
Mother -----------------------------> Son/Daughter
Spouse Relationship:
Husband ---------------------------> Wife
Wife ---------------------------> Husband
To learn more about database
https://brainly.com/question/29804491
#SPJ1
Complete Question:
what is entry relationship data model ?give an ER diagram for a database showing fatherhood,motherhood and spouse relationship among men and womean.
PLEASE HELP I WILL GIVE BRAINLIEST AND 100 POINTS IF U ANSWER COMPLETELY WITHIN 30 MIN
A classmate in your photography class missed several days of class, including the day that the instructor explained the artistic statement. Your classmate asks you to help fill them in so that they can create an artistic statement for an upcoming project. How would you explain this concept and the purpose behind it? What would you tell them to include in their statement? Explain.
The wat that you explain this concept and the purpose behind it as well as others is that
To create an artistic statement, you should start by thinking about what inspires you as an artist, and what themes or ideas you hope to address in your work. This could be anything from a particular emotion or feeling, to a social or political issue, to a specific artistic style or technique.What is the artistic statement?An artistic statement is a brief description of your artistic goals, inspiration, and vision as an artist. It should outline the themes and ideas that you hope to explore through your work, and explain what you hope to achieve or communicate through your art.
In the above, Once you have a sense of your inspiration and goals, you can start to craft your artistic statement. Some things you might want to include in your statement are:
Therefore, A description of your artistic process, including the mediums and techniques you use to create your work
A discussion of the themes or ideas you hope to explore through your artA statement about your goals as an artist, including what you hope to achieve or communicate through your workA discussion of the influences that have shaped your artistic style, including other artists or movements that have inspired youLearn more about photography from
https://brainly.com/question/13600227
#SPJ1
Answer:
I don't get the other answer :(
Explanation:
When it comes to credit scores, why is having a
thin file NOT good?
What reasons might an 18-year-old have for
his/her thin file?
Answer:
credit karma
Explanation:
karma is -69
# I need help with my python code, it won't work, and no matter what I try, I can't get it to run properly. Every time I try top run it, it gives me an error saying:
# syntaxError, bad input on line 43, I am not very good at programming, and I just started. I wanted to ask if you guys could help me.
# Here's my code, the purpose of it is to be a rock paper scissors game:
```
import random
def welcome_prompt():
print ("Rock paper Scissors game")
print ("Rules: Rocks beats Scissors, Scissors beats Paper, Paper beats Rock")
def get_player_move():
print ('Round ' + str(round))
print ("Please play one of the following")
move = raw_input(" 1) [R]ock, 2) [P]aper, 3) [S]cissors:")
if get_player_move == ("R"):
print ("You used Rock!")
return 1
elif get_player_move == ("P"):
print ("You used Paper!")
return 2
elif get_player_move == ("S"):
print ("You used Scissors!")
return 3
else:
print "Invalid input, please use capitalized initial (R,P,S)"
return get_player_move()
def get_computer_move():
get_computer_move = random.randint(1,3)
if get_computer_move == 1:
print ("Computer used Rock!")
return 1
elif get_computer_move == 2:
print ("Computer used Paper!")
return 2
elif get_computer_move == 3:
print ("Computer used Scissors!")
return 3
def compare_moves(get_player_move, get_computer_move):
if (get_player_move == 1 and get_computer_move == 1) or (get_player_move
== 2 and get_computer_move == 2) or (get_player_move == 3 and
get_computer_move == 3):
print ("It's a tie!")
return 0
elif (get_player_move == 1 and get_computer_move == 3) or
(get_player_move == 2 and get_computer_move == 1) or (get_player_move ==
3 and get_computer_move == 2):
print ("You win the round!")
return 1
elif (get_player_move == 1 and get_computer_move == 2) or
(get_player_move == 2 and get_computer_move == 3) or (get_player_move ==
3 and get_computer_move == 1):
print ("You lose the round!")
return -1
elif (get_player_move == 4):
print ("You didn't put in correct input, computer gets a free win")
return -1
player_score = 0
comp_score = 0
round = 0
welcome_prompt()
('Round ' + str(round))
while round< 10:
round = round + 1
get_player_move()
get_computer_move()
compare_moves(get_player_move, get_computer_move)
if compare_moves == 1:
player_score = player_score + 1
print 'Player Score'+ str(player_score)
print 'Computer Score'+ str(player_score)
elif compare_moves == -1:
comp_score = comp_score + 1
print 'Player Score'+ str(player_score)
print 'Computer Score'+ str(player_score)
print ("Game Over")
Answer:
hmm i would assume your syntax code has a hidden error that's messing up your code that you are trying to input inside your computers field matrix to do the game. question is where is that error?
Explanation:
a content-filtering technique where the software that performs the filtering task is placed on individual users' computers is called
The content-filtering technique where the software that performs the filtering task is placed on individual users' computers is called client-based filtering.
Content filtering can be done in several ways. It can be done by blocking specific sites, keywords, or IP addresses. It can also be done using a content filter, which can be server-based or client-based.
The filtering technique in which filtering is performed by installing filtering software on individual users' computers is known as client-based filtering.
Client-based filtering is a content-filtering technique in which filtering software is installed on individual users' computers. The client-based filtering approach has some advantages over the server-based filtering approach.
It provides more control over user access to the internet and can be configured to filter content based on user profiles. In addition, client-based filtering can be used to enforce internet usage policies in a corporate or educational setting
Client-based filtering is a content-filtering technique in which filtering software is installed on individual users' computers.
It is a useful technique in a corporate or educational setting because it provides more control over user access to the internet and can be configured to filter content based on user profiles.
To know more about content-filtering visit:
https://brainly.com/question/31217498
#SPJ11