Answer:
Following are the program in the Python Programming Language.
#set variable for input year by user
y=int(input("Enter year: "))
#set variable and initialize to 0
flag=0
#check condition that year is divisible by 4
if(y%4==0):
#check that the year is divisible by 100
if(y%100==0):
#check that the year is divisible by 400
if(y%400 ==0):
#then initialized flag to 1
flag=1
else:
#otherwise remain 0
flag = 0
else:
flag = 1
else:
flag = 0
#for break line
print()
#check that if flag is equal to 1
if(flag==1):
print("29 days in February")
#otherwise else
else:
print("28 days in February")
<u>Output</u>:
Enter year: 2020
29 days in February
Explanation:
<u>Following are the description of the program</u>:
- Set variable 'y' in which we get integer value as year from the user.
- Set variable 'flag' and initialize that variable to 0.
- Then, we set if-else conditional statements to check that the variable 'y' is divisible by 4 then, we check that the variable 'y' is divisible by 100 and we also check that the following variable is divisible by 400.
- Finally, we set if-else conditional statement to check that the variable 'flag' is equal to 1 then print about the leap year, otherwise it print about the non-leap year.
if your in school and always are getting into trouble the school will always be checking your records
Answer:
code
Explanation:
code are set of instruction executed by the computer.
The script that Andy would want to use is Javascript, here is the source code: document.getElementById("para1").innerHTML = formatAMPM();
function formatAMPM() {var d = new Date(), minutes = d.getMinutes().toString().length == 1 ? '0'+d.getMinutes() : d.getMinutes(), hours = d.getHours().toString().length == 1 ? '0'+d.getHours() : d.getHours(), ampm = d.getHours() >= 12 ? 'pm' : 'am', months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'], days = ['Sun','Mon','Tue','Wed','Thu','Fri','Sat'];return days[d.getDay()]+' '+months[d.getMonth()]+' '+d.getDate()+' '+d.getFullYear()+' '+hours+':'+minutes+ampm;<span>}
The HTML code needed to call this Javascript on his website is this: </span><span><div id="para1"></div>
</span>
You could call the Javascript up using PHP.
Hope this helps! Good luck! :)
Answer:
Computers can have both a positive and negative impact on education.
Positives:
-students have access to more information (the internet)
-students can more efficiently type and research
-students can save time (ex not having to walk to a library)
Negatives:
-can be a distraction
-students may have a harder time staying on task/topic
-students may develop a technology addiction