1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
labwork [276]
3 years ago
7

The current calendar, called the Gregorian calendar, was introduced in 1582. Every year divisible by four was declared to be a l

eap year, with the exception of the years ending in 00 (that is those divisible by 100) and not divisible by 400. For instance, the years 1600 and 2000 are leap years, but 1700, 1800, and 1900 are not. Write a program that requests a year as input and states whether it is a leap year. (Test the program on the years 2008, 2009, 1900, and 2000.)
Computers and Technology
1 answer:
Naily [24]3 years ago
8 0

Solution :

Public Function Is a Leap_Year(Year As_Integer) As Integer

'Dim Tor_F for local variable declaring if value is t/f.

Dim TorF As For Boolean

'Pre conditions: Year > 1581 and Year < 3000

If Year > 1581 And Year <> 1700 Or 1800 Or 1900 Then

IsLeapYear = Year / 4

Else

IsLeapYear = False

TorF = False

End If

End Function

You might be interested in
A start-up employs interns. The following details of interns are stored
Rufina [12.5K]

Answer: See below.

class Intern:

   def __init__(self):

       self.first_name = input("Enter first name: ")

       self.last_name = input("Enter last name: ")

       self.address = input("Enter address: ")

       self.mobile_number = input("Enter mobile number: ")

       self.e_mail = input("Enter e-mail: ")

   def getdata(self):

       print("First name: ", self.first_name)

       print("Last name: ", self.last_name)

       print("Address: ", self.address)

       print("Mobile number: ", self.mobile_number)

       print("E-mail: ", self.e_mail)

   def putdata(self):

       print("First name: ", self.first_name)

       print("Last name: ", self.last_name)

       print("Address: ", self.address)

       print("Mobile number: ", self.mobile_number)

       print("E-mail: ", self.e_mail)

Explanation:

7 0
2 years ago
Its an HTML5 anyone kwons
Aleksandr [31]

Answer:

1 will be stored in result

Explanation:

Given

The lines of code

Required

Determine the value stored in result

The value stored in result is determine by the condition (x<3 && y ==6)

In the first line, the value of x is 2 and the value of y is 6

So: x<3 is true because x = 2 and 2 is less than 3

y == 6 is also true because y = 6 and 6 is equal to 6

So, the condition (x<3 && y ==6) is true and true will be saved in variable result

Because result is a Boolean variable which can only take true or false value

1 represents true

0 represents false

<em>So, 1 will be stored in result</em>

7 0
3 years ago
In C Coding, print either "Fruit", "Drink", or "Unknown" (followed by a newline) depending on the value of userItem. Print "Unkn
shutvik [7]

The code below uses if-else structure to print the output depending on the value of the userItem.

If the specified condition in the if structure is true, the block in the structure gets executed.

Comments are used to explain the each line of the code.

//main.c

#include <stdio.h>

int main()

{  

   //defining the enum and userItem

   enum GroceryItem {GR_APPLES, GR_BANANAS, GR_JUICE, GR_WATER};

   enum GroceryItem userItem;

   //initializing the userItem

   userItem = GR_APPLES;

   

   //checking the userItem

   //If it is GR_APPLES or GR_BANANAS, print "Fruit"

   //If it is GR_JUICE or GR_WATER, print "Drink"

   //Otherwise, print "Unknown"

   if(userItem == GR_APPLES || userItem == GR_BANANAS){

       printf("%s\n", "Fruit");

   }

   else if(userItem == GR_JUICE || userItem == GR_WATER){

       printf("%s\n", "Drink");

   }

   else{

       printf("%s\n", "Unknown");

   }

   

   return 0;

}

You can see a similar question at:

brainly.com/question/17592042

6 0
3 years ago
Write a program that asks length and breadth of a rectangle a calculate its area qbasic​
Natasha_Volkova [10]

Answer:

INPUT "Enter the length";l

INPUT "Enter the width";w

PRINT "The area is ";l*w

5 0
3 years ago
Let S be an NP-complete problem and Q and R be two other problems not known to be in NP. Q is polynomial time reducible to S and
levacccp [35]

Answer:

B. R is NP Hard

Explanation:

Given:

S is an NP complete problem

Q is not known to be in NP

R is not known to be in NP

Q is polynomial times reducible to S

S is polynomial times reducible to R  

Solution:

NP complete problem has to be in both NP and NP-hard. A problem is NP hard if all problems in NP are polynomial time reducible to it.

Option B is correct because as given in the question S is an NP complete problem and S is polynomial times reducible to R.

Option A is not correct because R is not known to be in NP

Option C is not correct because Q is also not known to be in NP

Option D is not correct because Q because no NP-complete problem is polynomial time reducible to Q.

5 0
3 years ago
Other questions:
  • Copying and pasting from the internet can be done without citing the internet page, because everything on the internet is common
    13·1 answer
  • Where is the brightness and contrast changed at?
    10·2 answers
  • Task manager is showing an application as “not responding.” what can you do?
    11·1 answer
  • Count characters Write a program whose input is a string which contains a character and a phrase, and whose output indicates the
    6·1 answer
  • Speed in a given direction is called
    12·2 answers
  • Question 4: What will be the output of the code? Show a complete analysis.
    6·1 answer
  • A security manager has discovered that sensitive information stored on a server has been compromised. The organization is requir
    7·1 answer
  • Write a Python program that prints all the numbers from 0 to 6 except 3
    8·1 answer
  • In the earliest stages of human history, what was the only medium?
    10·1 answer
  • Help me pleaseeee!!!!!
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!