Answer:
// program in Python.
#read year
i_year=int(input("Please Enter a year:"))
#check leap year
if((i_year % 4 == 0 and i_year % 100 != 0) or (i_year % 400 == 0)):
print("{} is a leap year.".format(i_year))
else:
print("{} is not a leap year.".format(i_year))
Explanation:
Read year from user and assign it to variable "year".If year is completely divisible by 4 and not divisible by 100 or year is completely divisible by 400 then year is leap year otherwise year is not a leap year.
Output:
Please Enter a year:2003
2003 is not a leap year.
“Ana girl you need to stop going on the internet like that you know we can’t do that stuff on the work computers, and what if they check the history or the IT has that thing we’re you can see stuff on your computer on his computer?” ... “ Girl you finna get in some trouble and it’s gonna be your fault because you wanted Victoria Secret perfume” ... “Girl cut it out I’m telling you, and plus how do you know if I’m not IT I could like get you in trouble girl so yeah stop”
How efficient well if we are transmitting 6bits and we need 10 to transmit the 6 bits that would be 6/10 = .6 = 60% efficient.
Answer:
// here is code in Java.
// package
import java.util.*;
// class definition
class Main
{
// method that return sum of two sale value
public static int Add(int euroSales,int asiaSales)
{
// return the sum
return euroSales+asiaSales;
}
//main method of the class
public static void main (String[] args) throws java.lang.Exception
{
try{
// variables
int euroSales=100;
int asiaSales=150;
int eurasiaSales;
// call the function
eurasiaSales=Add(euroSales,asiaSales);
// print the sum
System.out.println("total sale is:"+eurasiaSales);
}catch(Exception ex){
return;}
}
}
Explanation:
Declare and initialize two variables "euroSales=100" and "asiaSales=150". Declare another variable eurasiaSales. Call the method Add() with euroSales and asiaSales as parameter. This method will add both the value and return the sum.This sum will be assigned to variable eurasiaSales.Then print the sum.
Output:
total sale is:250
The programmer solves the problems of a user by expressing an algorithm in a programming language to make a program that can run on a computer.