Answer:
Following are the correct code to this question:
def leap_year(year):#defining a method to check if year is leap year
if ((year%4==0) and (year%100!=0)) or (year%400==0):#defining condition to check value
return 1 #return value 1
return 0 #return 0
def number_of_days(month,year):#defining method number_of_days to calculate year or month is leap year are not
if month==2: #defining if block to calculate leap year value
if leap_year(year):#using if block to call leap_year month
return 29#return value 29
return 28 #return value 28
if month in days_31: #defining if block to calculate day
return 31 #return value 31
return 30#return value 30
def days_left(day,month,year):#defining method days_Left
daysLeft = number_of_days(month,year)-day#defining variable daysLeft which calls number_of_days method
month += 1 #increment month variable value by 1
while month<=12:#defining while loop to Calculate left days
daysLeft += number_of_days(month,year) #using daysLeft variable to hold number_of_days value
month += 1 #increment value of month variable by 1
return daysLeft #return daysLeft value
days_31 = [1,3,5,7,8,10,12] #defining days_31 dictionary and assign value
days_30 = [4,6,9,11] # defining days_30 dictionary and assign value
print('Please enter a date') #print message
day = int(input('Day: ')) #defining day variable and input value
month = int(input('Month: '))#defining Month variable and input value
year = int(input('Year: '))#defining Year variable and input value
print('Menu:')#print message
print('press 1 to Calculate the number of days in the given month.')#print message
print('press 2 to Calculate the number of days left in the given year.')#print message
choice = int(input())#defining choice variable and input the value
if choice==1: #defining if block to check choice
print(number_of_days(month,year)) #call method number_of_days and print value
elif choice==2: #defining elif block to check value
print(days_left(day,month,year))#call days_left and print value
Output:
Please enter a date
Day: 2
Month: 6
Year: 2018
Menu:
press 1 to Calculate the number of days in the given month.
press 2 to Calculate the number of days left in the given year.
2
194
Explanation:
In the given python code, three methods "leap_year, number_of_days, and days_left " is declared, in which we calculate all the values that can be described as follows:
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 declared that accepts the "year and month" variable as the parameter and calculates 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, which assign a value and used use three input variable day, month, and year variable to accepts user input value. In the next step, a choice variable is declared, that input values and calls and print its value accordingly.The calendar program illustrates the use of conditional statements
In programming, conditional statements are used to make decisions.
The calendar program in Python where comments are used to explain each line is as follows:
#This defines the function that calculates the days in a month
def daysMonth(month,year):
#This checks for leap year (i.e. February), and returns the number of days
if month==2:
if ((year%4==0) and (year%100!=0)) or (year%400==0):
return 29
return 28
#This checks and returns the number of days in the other months
if month in [1,3,5,7,8,10,12]:
return 31
return 30
#This defines the function that calculates the days remaining in a year
def countDays(day,month,year):
#This calculates the days remaining in the current month
daysLeft = daysMonth(month,year)-day
month += 1
#The following loop determines the days left in the year
while month<=12:
daysLeft += daysMonth(month,year)
month += 1
#The returns the days left in the year
return daysLeft
#This gets the day as input
day = int(input('Day: '))
#This gets the month as input
month = int(input('Month: '))
#This gets the year as input
year = int(input('Year: '))
#This gets the choice
choice = int(input("1 - Days in the month\n2 - Days left in the year\nChoice: "))
#If the choice is 1, this prints the days in the month
if choice==1:
print("There are",daysMonth(month,year),"days in the month")
#If the choice is 2, this prints the days left in the year
elif choice==2:
print("There are",countDays(day,month,year),"left in the year")
Read more about conditional statements at:
https://brainly.com/question/19248794
¿Cuánta energía consumirá una lavadora de 1200W de potencia, si se deja conectada durante 20 horas? ¿Cuánto deberemos pagar si el coste de la energía consumida es de 0,12€/kWh?
Answer:
The amount to be paid is €2.88 for the amount of power consumed
Explanation:
The first thing to do here is to convert the power consumption to kilo-watt
1 kilowatt = 1000 watt
x kilowatt = 1200 watt
x = 1200/1000 = 1.2 KW
we now convert this to kilowatt hour by multiplying the number of hours by the number of kilowatt.
That would be 20 * 1.2 = 24 KWh
Now, the charge is 0.12€/kWh
for 24 kWh, we have 24 * 0.12 = €2.88
what is a computer virus?
Answer:
A computer virus, my friend, is something you do NOT want on your computer. It can corrupt your PC's system or destroy data!
Explanation:
A computer virus itself is some code that can clone itself. Then, it goes off to corrupt your system and destroy data, for instance, take those saved memes.
Save your memes! Download a safe antivirus. (Be careful because some of them are disguised and are really malware.)
Answer:
Programs that are intended to interfere with computer, tablet, and smartphone operations and can be spread from one device to another.
Explanation:
Why does the phrase "compatibility mode” appear when opening a workbook?
1. The workbook was created using Excel 2016.
2. A version older than Excel 2016 was used to create the workbook .
3. A version newer than Excel 2016 was used to create the workbook.
4. The workbook was created using Word 2016.
Answer: 2. A version older than Excel 2016 was used to create the workbook .
Explanation: The compatibility mode appears whenever a workbook initially prepared using an excel software version which is older than the excel software which is used in opening the file or workbook. The compatibility mode is displayed due to the difference in software version where the original version used in preparing the workbook is older than the version used in opening the workbook. With compatibility mode displayed, new features won't be applied on the document.
Answer:
B: A version older than Excel 2016 was used to create the workbook.
mention 5 advantages of internet
Answer:
1) We can get various types of information, knowledge.
2) We can communicate with each other no matter where they are if they have internet connection.
3) It can be used as a source of entertainment.
4) Through internet, we can work from home especially in this quarantine time.
5) Through internet, we can show our talent and skills.
Hope it helps :)
If you liked it, please mark this answer as the brainliest one.
[ANSWER = BRAINLIEST] How to mark an answer as brainliest?
Answer:
once your question is answered you get an option available on the bottom of the answer
see attached
and you click on Mark as brainliest
Answer:
You are able mark a question Brainliest when there are 2 existing answers, or if 1 answer has existed for a while.
Hope this helps! Now get in there and mark me Brainliest! :v
LOL...s o r r y
a search engine is aprogram to search what?
Answer:A web search engine or Internet search engine is a software system that is designed to carry out web search (Internet search), which means to search the World Wide Web in a systematic way for particular information specified in a textual web search query.
i think it's the good answer if im right
Explanation:
Answer:
This is a software system designed to search the internet on World wide web in a systemic way for particular information specified in a textual web search query.
Explanation:
I hope it helps you thanks!!.
What is
i) File
ii) Folder
What is the name of the item that supplies the exact or near exact voltage at the required wattage to all of the circuitry inside your computer?
Answer:
It's the power supply
Explanation:
The power supply is what essentially enables the computer to operate. It is able to do that by converting the incoming alternating current (AC) to direct current (DC) at the correct wattage rating that is required by the computer to function. The power supply is a metal box that is generally placed in the corner of the case.
Which of the following might not exist in a URL?
А. The top-level domain
B. The resource ID
C. The protocol
D. The second-level domain
Answer:
Resource ID
Explanation:
Create a function called "strip_r_o" that takes in a STRING and strips all the Rs and Os from the string. Also use a FOR loop in you program to check each letter of the STRING
Python
Answer:
The program is as follows (Take note of the comments and see attachment)
#Start of Program
def strip_r_o(word): #Declare Function strip_r_o
resultt = "" #initialize resultt to empty string
for i in range(len(word)): #Iterate from first character of input string to the last
if (not word[i] == "R") and (not word[i] == "O"): #Check if current character is not R and O
resultt = resultt + word[i] #if condition is true, add character to resultt
print(resultt) #Print string after character has been removed
#End of Function
Word = input("Enter a string: ") #Prompt user for input
strip_r_o(Word) #Call strip_r_o function
#End of Program
Explanation:
The program starts and end with a comment
Line 2 of the program declares function strip_r_o
Line 3 initializes a string variable resultt to an empty string
Line 4 iterates from first character of input string to the last
Line 5 checks each character for O or R
If true, line 6 is executed by removing O or R from the input string and saving what's left in variable resultt
Line 7 prints the end result after O and R have been removed from the input string
Line 8 is a comment
Line 9 prompts user for an input string
Line 10 calls the strip_r_o function
Suppose you want to find pages that contain the word German but not the word Shepherd. Which search would achieve? German OR Shepherd "German Shepherd" German -Shepherd "German" + "Shepherd"
Answer:
The correct answer is C) "German -Shepherd"
Explanation:
Computerized have evolved to allow for the combination or contrasting or various words.
This is made possible using Boolean Logical Operators such as AND, OR and NOT. Using any of the terms above translates to the presence of a search strategy.
In some search engines, the symbol "+" symbol is used instead of the operator "AND". In other cases, the symbol "-" is used instead of "NOT".
The effect achieved is that "German -Shepherd" excludes the word "Shepherd" from the results.
Cheers!
Answer:
C
Explanation:
In batch operating system three job J1 J2 and J3 are submitted for execution each job involes an I/O activity a CPU time and another i/o activity job a requires a total of 20 ms with 2 ms CPU time J2 requires 30 ms total time with 6 ms CPU time J3 requires15 ms total time 3 ms CPU time what will be the CPU utilization for uniprogramming and multiprogramming
Answer:
(A) The CPU time for J1 is =2 ms other time is =18 ms, for J2 CPU time =6 ms other time = 24 ms, for J3 CPU time = 3 ms and other time = 12 ms (B) The CPU Utilization for uni-programming is 0.203 or 20.3% (C) For Multi-programming, when a program is not free and busy with an operation, the CPU is allocated to other programs.
Explanation:
Solution
Given that:
A(1)Job J1 = CPU time = 2ms
Other time =18 ms
Total time = 20 ms
(2)Job J2 = CPU time 6ms
Other time = 24 ms
Total time = 30 ms
(3)Job J3 = CPU time = 3ms
Other time =12ms
Total time = 15 ms
(B) For the CPU Utilization for uni-programming, we have the following as follows:
CPU utilization =The total time of CPU/The total real time
Thus,
=(2 +6+3) / (18+24+12)
= 11/54
=0.203 or 20.3%
(C) For the CPU utilization for multi-programming, when a program is not available that is busy in an operation, such as the input and output the CPU can be allocated or designated to other programs
I NEED HELP ASAP:
A truth table has 8 inputs and 5 logic gates. How many rows will you need for your truth table? Show your working. [3 marks]
(Don't bother answering, your not getting brainliest)
Answer:
64
Explanation:
A truth table can be defined as a table that tells us more about a Boolean function.
A truth tables also gives us more information about how logic gates behave. They also show us the relationships between the inputs and outputs of a logic gates.
Logic gates are essential and fundamental components of an electrical circuit.
The rows on a truth table shows us the possible combinations of the inputs of a circuits as well as it's resulting or corresponding outputs.
In order to determine the number of rows that a truth table has, the formula below is used.
Number of rows in a truth table = (Number of Inputs)²
In the question above, we are told that
A truth table has 8 inputs and 5 logic gates. The number of rows needed for this truth table is calculated as:
Number of rows in a truth table = (Number of Inputs)²
Number of rows in a truth table = (8)²
= 64 rows.
The number of rows needed for the truth table is 64
The given parameters are:
Inputs = 8Logic gates = 5The number of rows in the truth table is then calculated as:
[tex]Row = Inp ut^2[/tex]
Substitute value for Input
[tex]Row = 8^2[/tex]
Evaluate the exponent
[tex]Row = 64[/tex]
Hence, the number of rows needed for the truth table is 64
Read more about logic gates at:
https://brainly.com/question/20394215
What does FLUX do when soldering an electrical joint?
Answer:
Flux is an acidic blend that makes a difference evacuate oxides from the range of the joint and so makes a difference the patch stream effectively over the joint and frame a great bond. The flux can be seen as a brown fluid as a patch is warmed, and it in some cases gives off a impactful smoke that can act as a aggravation.
Explanation:
flux prevents oxidation of the base and filler materials. while soldering the metals, flux is used as threefold purpose, as it removes the oxidised metal from this surface to be soldered.
Explain the BASIC key statement of INPUT?
Answer:
This portion of program that instructs a computer how to read Un
and process information.
Explanation:
Hope it helps.
the command button to protect a document is part of the.
(a) Insert tab
(b) Home tab
(c) file tab
Plz answer me
Answer:
C file tab
Explanation:
hope this helps
What is the difference between user program and packages program?
Answer//
program is to enter a program or other instructions into (a computer or other electronic device) to instruct it to do a particular task while package is to pack or bundle something.
// have a great day //
Explanation//
A program is exactly that: a set of instructions that tells a computer how to do something.
The term package has multiple meanings, but with regard to programs, it generally means “the set of program files, data files, and other things that make up a particular application”.
// may I have Brainliest? //
Question 2: Write True or False beside each of the statements below:
a. Handheld computers are the smallest type of personal computer.
b. Mainframes are designed for interactive use.
c. A handheld can be used to keep track of appointments.
d. A server is usually found on an office employee’s desk.
e. A supercomputer is used to perform overly complex tasks.
f. A workstation usually features specific software.
Answer:
truetruetruefalsetruetruewhat is i.a folder ii.file
Answer
Folder A digital folder has the same purpose as a physical folder – to store documents.
The function of PC Register?
Answer:
registers are types of computer memory used to quicky accept, store and transfer data and instuctions that ae being used immidately by the cpu
Explanation:
the registers used by the cpu are oftern termed as processor registers.
hope that helps :)
In terms of twitch skills vs thought skills, Tetris: (1 point)
emphasizes twitch skills
emphasizes thought skills
emphasizes both twitch and thought skills
uses neither type of skill
The correct answer is C. Emphasizes both twitch and thought skills
Explanation:
In games, twitch skills refer to the player's ability to respond in a short time or react to a certain stimulus. On the other hand, thought skills are complex skills that require players to create strategies or analyzing before taking any action in the game.
In the case of Tetris, which requires players to complete lines by using pieces with different shapes both twitch and thinking skills are involved because to complete the line correctly the players needs to analyze the shape and where this should be placed before pressing any buttons (though skills), but at the same time, the player needs to reach in a short time (twitch skills) for example, by rotating each piece in a short time to complete the line.
If involved in a boating accident causing serious bodily injury or death while boating under the influence, the operator has committed a _____. felony misdemeanor non-criminal offense liability
Answer:
felony
Explanation:
It is an offence on the part of a boat operator who is under the control of alcohol while boating, as such could result in property damage, serious bodily injury or death. Where such leads to bodily injury or deaths, the operator could be convicted for felony while misdemeanor applies to property damage.
There have been a reoccurring boating incidence in the country especially in the state of Florida, which has the highest number of boating fatalities hence created stiff penalties for boating under the influence of alcohol.
While it is adviseable for motorists not to drink and drive, it is also not lawful be under the influence when boating as such could cause injury, deaths or property damage and such operator would receive appropriate penalty depending on the outcome of the incident.
_______________ is the use of IT in communication. a) email b) Chatting c) FTP d) All of the above
A file name extension provides what information about a file?
Answer:
A file extension or file name extension is the ending of a file that helps identify the type of file in operating systems, such as Microsoft Windows. In Microsoft Windows, the file name extension is a period that is often followed by three characters but may also be one, two, or four characters long.
Explanation:
Answer:
File format
Explanation:
Question 3 of 10
2 Points
What is the term for classifying and grouping organisms?
O A. Outgrouping
B. Taxonomy
O O
O C. Linnaeus
O D. Ancestor
Answer:
B. Taxonomy
Explanation:
Taxonomy is a term used in biological sciences. It is defined as the grouping together or classification of living organisms such as Plants, Animals and Microorganisms in specific categories or groups based on similarities in certain characteristics or morphology which they share.
Carl Linnaeus a scientist (botanist) from Sweden has been described or named as the Father of Taxonomy. This is because created what is known as the Linnaean Taxonomy system in which organisms are classified and named.
Living Organisms are classified into ranks or hierarchy listed below:
a) Domain
b) Kingdom
c) Phylum(for Animals) or Division (for Plants)
d) Class
e) Order
f) Family
g) Genus
h) Species.
NEEDED ASAP
1. What are shortcut keys?
2. Mention 5 Examples of shortcut keys and their functions
3. Create a table and put the description for the following shortcut keys.
Shortcut Keys
i. Ctrl+Esc
ii. Ctrl+Shift+Esc
iii. Alt+F4
iv. Ctrl H
v. Ctrl E
4. Give three importance of shortcut keys
5. Are shortcut keys helpful? Explain your answer in not less than five lines.
Explanation:
1. special key combination that causes specific commands to be executed typically shortcut keys combine the ctrl or alt keys with some other keys.
2. 5 example of shortcut keys are:-
1. ctrl + A - select all2.ctrl + B - bold3. ctrl + C - copy 4. ctrl + U - under line 5. ctrl + v - paste3. (i) open the start menu
(ii) open Windows task manager
(iii) close the currently active program
(iv) replace
(v) align center
4. the three importance of shortcut keys are :
efficient and time saving :- using shortcut make you more efficient at doing certain task on your computer .multi-tasking :- being a multi Tasker is something required in life.health benefit :- cutting down on your mouse usage by using keyboard shortcut can help reduce the risk of RSI (Repetitive Syndrome Injury).5. shortcut keys are very helpful because it take less time. keyboard shortcuts are generally used to expedite common operation by reducing input sequence to a few keystrokes.
Answer:
all of the above is correct
Explanation:
Draw a flow chart that accepts mass and volume as input from the user. The flow chart should compute and display the density of the liquid.( Note: density = mass/volume ).
Answer:
See attachment for flowchart
Explanation:
The flowchart is represented by the following algorithm:
1. Start
2. Input Mass
3. Input Volume
4 Density = Mass/Volume
5. Print Density
6. Stop
The flowchart is explained by the algorithm above.
It starts by accepting input for Mass
Then it accepts input for Volume
Step 4 of the flowchart/algorithm calculated the Density using the following formula: Density = Mass/Volume
Step 5 prints the calculated Density
The flowchart stops execution afterwards
Note that the flowchart assumes that the user input is of number type (integer, float, double, etc.)
If you want to copy text formatting from one area of your document to another area, _____. a. select the formatting you would like to copy, click the Format Painter, then select the text to repeat the formatting b. select the formatting you would like to copy, copy the text, click Paste Formatting c. select the formatting you would like to copy, right-click the Format Painter, select Repeat d. double click the Format Painter
Answer:
I believe it is ‘A’
Explanation:
The Format Painter feature copies only the formatting from one selected text to another. The content and text of the selection will not be copied using Format Painter.
Answer:
It is A
Explanation:
When considering who to approach as a possible mentor for you when you are
developing and marketing your game, you should consider: (1 point)
developers who succeeded in marketing a game
developers who failed to properly market a game
developers you don’t know personally
all of the above
Answer:
i would say all of the above
Explanation:
you can learn from peoples success and failures, and don't be shy to meet new people.
Write a JavaScript program that reads three integers named start, end, and divisor from three text fields. Your program must output to a div all the integers between start and end, inclusive, that are evenly divisible by divisor. The output integers must be separated by spaces. For example, if a user entered 17, 30, and 5, your program would output "20 25 30" (without the quotes) because those are the only integers between 17 and 30 (including 17 and 30) that are evenly divisible by 5.
The question is incomplete! Complete question along with answer and step by step explanation is provided below.
Question:
Write a JavaScript program that reads three integers named start, end, and divisor from three text fields. Your program must output to a div all the integers between start and end, inclusive, that are evenly divisible by divisor. The output integers must be separated by spaces. For example, if a user entered 17, 30, and 5, your program would output "20 25 30" (without the quotes) because those are the only integers between 17 and 30 (including 17 and 30) that are evenly divisible by 5.
DO NOT SUBMIT CODE THAT CONTAINS AN INFINITE LOOP. If you try to submit code that contains an infinite loop, your browser will freeze and will not submit your exam to I-Learn.
If you wish, you may use the following HTML code to begin your program.
Due to some techincal problems the remaining answer is attached as images!