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.
Answer is :
=D3+A3-B3
These Cell address contain following statement:
D3= Olivia saving account balance
A3= Olivia 3 month income
B3= Olivia 3 month expense
so, Expense are also deducted from income and income is added into saving balance.
In this situation we are use this formula:
=D3+A3-B3
Parallel circuit. On a wire you put the lights and one switch, on the other you put a resistor and another switch. (and the third wire contains the generator)
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