2.13 LAB: Branches: Leap Year
A year in the modern Gregorian Calendar consists of 365 days. In reality, the earth takes longer to rotate around the sun. To account for the
difference in time, every 4 years, a leap year takes place. A leap year is when a year has 366 days: An extra day, February 29th. The
requirements for a given year to be a leap year are:
1) The year must be divisible by 4
2) If the year is a century year (1700, 1800, etc.), the year must be evenly divisible by 400
Some example leap years are 1600, 1712 and 2016.
Write a program that takes in a year and determines whether that year is a leap year.
Ex If the input is
1712
the output is
1712 13 leap year.
Ex If the nouts
1913
the outoutis
1913 not leap year.
Written is Coral Language

Answers

Answer 1

Answer:

integer userInput

userInput = Get next input

if userInput % 400 == 0

  Put userInput to output

  Put " is a leap year" to output

else

  if userInput % 4 == 0

     Put userInput to output

     Put " is a leap year" to output

  else

     Put userInput to output

     Put " is not a leap year" to output

Explanation:

I don't know what is so special about Coral but here we go. I couldn't find and IDE that supported Coral so I just used their Coral simulator on their website. The first if statement on line 5 determines if the number is divisible by 400. If so, the leap year is on a century year e.g 1900 1800. If not, the else statement will be executed and the second if statement will execute. If the number is divisible by 4, it is a leap year. If not, the else statement gets executed in which case the number was not a century leap year or a leap year. After that the program terminates.

Hope this helped :)  If it didn't let me know and I do my best to find out what went wrong.

Have a good day :)


Related Questions

what are the functions of language in logic?​

Answers

Answer:

Three basic functions of language: Informative, Expressive, and Directive Language

Informative language. Simply put, informative language can be looked at as though it is either right or wrong, or true or falseExpressive languageDirective language

explain the working principle of computer? can anyone tell​

Answers

Answer:

input process and output hehe

Fasilitas untuk pengaturan batas kertas pada Microsoft Word adalah….

a. Margin
b. View
c. LayOut
d. Paragraph

Office 92 sering disebut juga dengan….

a. Office 3.0
b. Office 7.0
c. Office Xp
d. Office 2.0


Answers

Fasilitas untuk pengaturan batas kertas pada Microsoft Word adalah

B.View

Office 92 sering disebut juga dengan

A.Office 3.0

T
N
O
?
You can insert only the row
only to
True or false

Answers

false

Explanation:

good luck bro

have a great day

Answer:

false

Explanation:

e) Point out the errors( if any) and correct them:-
class simple
{
inta,b,c;
double sumNumber
{
int d = a + b + c;
double e = d/5.6;
return e;
}
void show Number()
{
a = 10, b = 20, c=5;
System.out.println(d);
double f = sumNumber(a,b,c);
System.out.print(e);
}
}​

Answers

Explanation:

double e-d/5.6;is wrong it should return to c

What do you do if your computer dies/malfunctions? Reboot (Restart) Shut Down Recovery CD and Recover your system Call a person to fix it​

Answers

Answer:

Restart

Explanation:

Simply I may restart my pc if it dies/malfunctions. I'll not restart immediately, I'll wait for an hour and do restart my computer. If it doesn't work then maybe I'll Call a person to fix it.

I connected to an external hard drive to transfer some photos from my vacation. When I try to drag the photo, it bounces right back and does not transfer. What is the likely cause of this issue?

a. hard drive is full

b. photos were taken in a different country

c. USB port is broken

d. the file structure of the 2 hard drives are not compatible

Answers

Your answer is D.

Hope this helps and if you could answer the question I just uploaded titled giving brainliest that would be great. Basically, what you have to do is research why the book titled the list of things that will not change and explain why it’s your favorite book based on the message it tells you! Go to my profile and go to questions.

The answer is D, What is the likely cause of this issue is that the file structure of the two hard drives are not compatible.

The file structure or file system, of a hard drive, tells the disk how to read, write and store information on the drive. Some file systems do not allow the disk to store any files and often do not display error messages. If we try to drag a file onto a hard drive with this kind of file structure, the action would simply not be performed. This can be fixed by formatting the disk partition into a new file system.

Option B states that the issue may be that the photos were taken in a different country. This is not the cause of the problem because regardless of where the pictures are taken, they are all stored in common formats such as:

JPEGPNGJFIF

Any external hard drive capable of storing images will have the ability to receive files in these formats as well as many other image formats. For this reason, option B is False.

The question states that you were able to connect the external Hard drive and drag files onto it, though unsuccessfully. This tells us that the USB port is working as intended, if it were not working, it would not display the Hard drive onto the computer and we would not be able to drag files to it. Therefore, option C is false

Insufficient Hard drive storage space is a common issue in not being able to transfer files between hard drives. However, if this were the case, the user would be shown a message displaying the error. The message may look like:

"Insufficient space on the disk.""The Disk is full.""Not enough memory to complete this action"

The exact wording may vary depending on the operating system in use. Since the question states that the files simply "bounces back" without an error message displaying, we can infer that option A is false.

For more help with Hard drive issues see: https://brainly.com/question/14254444?referrer=searchResults

How to prepare and draw a corresponding flowchart to compute the sum and product of all prime numbers between 1 and 50

Answers

Answer:

Create boxes with the following content

Initialize sum to 0, product to 1 and number to 1Check if number is a prime. If yes, update sum += number and product *= numberIncrease number by 1If number is <= 50, go back to "check" block.

The check block has a diamond shape.

At the "yes" branch of the check block, you can create separate blocks for updating the sum and the product.

Connect the blocks using arrows.

Indicate the start and the end of the flow using the appropriate symbols.

The block to check if a number is a prime you could further decompose into the steps needed to do such a check.

Write a program that asks the user to enter in a username and then examines that username to make sure it complies with the rules above. Here's a sample running of the program - note that you want to keep prompting the user until they supply you with a valid username:

Answers

user_in = input ("Please enter your username: " )

if user_in in "0123456789":

print ("Username cannot contain numbers")

elif user_in in "?":

print ("Username cannot continue special character")

else:

print (" Welcome to your ghetto, {0}! ".format(user_in))

By Using the following schema, answer the following SQL queries and commands: Product(P_code.P_name, P_price, P_on_hand,vend_code) Vender(vend_code, vend_fname, vend_areacode, vend_phone) 1- find the venders names who sell products in TN-5 area and their names include "dan". 2- find the code, name and vender code of product that has price between 1500S and 2500S and the product that has price between 48005 and 5600S. 3- Find the name, and code of venders who had 5 microwaves that has price less than 3500S. 4- Find the phone numbers of venders who sell Televisions. 5- Delete the records of venders who their first name is 'smith'

Answers

Explanation:

answer me pls i need sol bbbd

Write a program that randomly chooses among three different colors for displaying text on the screen. Use a loop to display 20 lines of text, each with a randomly chosen color. The probabilities for each color are to be as follows: white 30%, blue 10%, green 60%. Suggestion: Generate a random integer between 0 and 9. If the resulting integer falls in the range 0 to 2 (inclusive), choose white. If the integer equals to 3, choose blue. If the integer falls in the range 4 to 9 (inclusive), choose green. Test your program by running it ten times, each time observing whether the distribution of line colors appears to match the required probabilities.

Answers

INCLUDE Irvine32.inc

.data

msgIntro  byte "This is Your Name's fourth assembly extra credit program. Will randomly",0dh,0ah

        byte "choose between three different colors for displaying twenty lines of text,",0dh,0ah

        byte "each with a randomly chosen color. The color probabilities are as follows:",0dh,0ah

        byte "White=30%,Blue=10%,Green=60%.",0dh,0ah,0

msgOutput byte "Text printed with one of 3 randomly chosen colors",0

.code

main PROC

;

//Intro Message

      mov edx,OFFSET msgIntro  ;intro message into edx

      call WriteString         ;display msgIntro

      call Crlf                ;endl

      call WaitMsg             ;pause message

      call Clrscr              ;clear screen

      call Randomize           ;seed the random number generator

      mov edx, OFFSET msgOutput;line of text

      mov ecx, 20              ;counter (lines of text)

      L1:;//(Loop - Display Text 20 Times)

      call setRanColor         ;calls random color procedure

      call SetTextColor        ;calls the SetTextColor from library

      call WriteString         ;display line of text

      call Crlf                ;endl

      loop L1

exit

main ENDP

;--

setRanColor PROC

;

; Selects a color with the following probabilities:

; White = 30%, Blue = 10%, Green = 60%.

; Receives: nothing

; Returns: EAX = color chosen

;--

      mov eax, 10              ;range of random numbers (0-9)

      call RandomRange         ;EAX = Random Number

      .IF eax >= 4          ;if number is 4-9 (60%)

      mov eax, green           ;set text green

      .ELSEIF eax == 3         ;if number is 3 (10%)

      mov eax, blue            ;set text blue

      .ELSE                    ;number is 0-2 (30%)

      mov eax, white           ;set text white

      .ENDIF                   ;end statement

      ret

setRanColor ENDP

Analyzing the role of elements in audio editing and Video
+ analyzing the role of the visual element in Video + analyzing the role of text factor
+ analyzing the role of the audio factor
+ analyzing the role of the transfer scene
+ analysing the role of the audio visual effects

Answers

Answer:

Analyzing the role of elements in audio editing and Video

+ analyzing the role of the visual element in Video + analyzing the role of text factor

+ analyzing the role of the audio factor

+ analyzing the role of the transfer scene

+ analysing the role of the audio visual effect

What are some 5 constraints in using multimedia in teaching​

Answers

Answer:

Explanation:

Technological resources, both hardware and software

Technological skills, for both the students and teacher

Time required to plan, design, develop, and evaluate multimedia activities

Production of multimedia is more expensive than others because it is made up of more than one medium.

Production of multimedia requires an electronic device, which may be relatively expensive.

Multimedia requires electricity to run, which adds to the cost of its use

There are constraints in using multimedia in teaching​; The Technological resources, both hardware and software Also, Technological skills, for both the students and teacher

What is a characteristic of multimedia?

A Multimedia system has four characteristics and they are use to deliver the content as well as the functionality.

The Multimedia system should be be computer controlled. The interface is interactive for their presentation and lastly the information should be in digital.

There are constraints in using multimedia in teaching​;

The Technological resources, both hardware and software

Also, Technological skills, for both the students and teacher

Since Time required to plan, design, develop, and evaluate multimedia activities

The Production of multimedia is more expensive than others because it is made up of more than one medium.

The Production of multimedia requires an electronic device, which may be relatively expensive.

The Multimedia requires electricity to run, which adds to the cost of its use.

Learn more about multimedia here;

https://brainly.com/question/9774236

#SPJ2

Code Example 17-1 class PayCalculator { private: int wages; public: PayCalculator& calculate_wages(double hours, double wages) { this->wages = hours * wages; return *this; } double get_wages() { return wages; } }; (Refer to Code Example 17-1.) What coding technique is illustrated by the following code? PayCalculator calc; double pay = calc.calculate_wages(40, 20.5).get_wages(); a. self-referencing b. function chaining c. dereferencing d. class chaining

Answers

Answer:

The answer is "Option b".

Explanation:

Function chaining is shown by this code, as the functions are called one after the other with one statement. Whenever you want to call a series of methods through an object, that technique is beneficial. Just because of that, you may give the same effect with less code and have a single given value only at top of the leash of operations.

2. Which property is used for hiding text of the textbox?
a) Password Char b) Text Char c) Char Password d) Pass Char

Answers

Answer:

password char

Explanation:

The password char property allows the text being written in the textbox to be hidden in the form of dots or stars. As such the user entering the password is secure, as no one nearby can know the password by watching the texts.

Discuss the OSI Layer protocols application in Mobile Computing

Answers

Answer:

The OSI Model (Open Systems Interconnection Model) is a conceptual framework used to describe the functions of a networking system. The OSI model characterizes computing functions into a universal set of rules and requirements in order to support interoperability between different products and software.

hope that helps you

please follow

please mark brainliest

The advantage of returning a structure type from a function when compared to returning a fundamental type is that a. the function can return multiple values b. the function can return an object c. the function doesn’t need to include a return statement d. all of the above e. a and b only

Answers

Answer:

The advantage of returning a structure type from a function when compared to returning a fundamental type is that

e. a and b only.

Explanation:

One advantage of returning a structure type from a function vis-a-vis returning a fundamental type is that the function can return multiple values.  The second advantage is that the function can return can an object.  This implies that a function in a structure type can be passed from one function to another.

Compute the acceleration of gravity for a given distance from the earth's center, distCenter, assigning the result to accelGravity. The expression for the acceleration of gravity is: (G * M) / (d2), where G is the gravitational constant 6.673 x 10-11, M is the mass of the earth 5.98 x 1024 (in kg) and d is the distance in meters from the earth's center (stored in variable distCenter).
#include
using namespace std;
int main() {
double G = 6.673e-11;
double M = 5.98e24;
double accelGravity;
double distCenter;
cin >> distCenter;
/* Your solution goes here */
cout << accelGravity << endl;
return 0;
}

Answers

Answer:

Replace /* Your solution goes here */ with the following expression

accelGravity = (G * M) / (distCenter *distCenter );

Explanation:

Required

Complete the code

The equivalent expression of (G * M) / (d^2) is:

(G * M) / (distCenter *distCenter );

The expression must be stored in accelGravity.

So, we have:

accelGravity = (G * M) / (distCenter *distCenter );

tinh S(n) = 1+2+3+.....+n

Answers

Answer:

-1/12

Explanation:

[tex]\sum_{k=0}^{k=n} k = \frac{n(n+1)}{2}\\[/tex]

look up the derivation by Srinivasa Ramanujan for a formal proof.

3. Using Assume the following list of keys: 36, 55, 89, 95, 65, 75, 13, 62, 86, 9, 23, 74, 2, 100, 98 This list is to be sorted using the quick sort algorithm as discussed in this chapter. Use pivot as the middle element of the list. a. Give the resulting list after one call to the function partition. b. What is the size of the list that the function partition partitioned

Answers

Answer:

a. 36, 55, 13, 9, 23, 2, 62, 86, 95, 65,74, 75, 100, 98, 89

b. 15

Explanation:

cloud offers better protection compare to on premise?​

Answers

Why is cloud better than on-premise? Dubbed better than on-premise due to its flexibility, reliability and security, cloud removes the hassle of maintaining and updating systems, allowing you to invest your time, money and resources into fulfilling your core business strategies.

The security of the cloud vs. on-premises is a key consideration in this debate. Cloud security controls have historically been considered less robust than onprem ones, but cloud computing is no longer a new technology. . A company running its own on-premises servers retains more complete control over security.

Believe it!!

Pls follow me.

You are consulting with another medium sized business regarding a new database they want to create. They currently have multiple normalized source databases that need consolidation for reporting and analytics. What type of database would you recommend and why

Answers

Answer:

The enormous amount of data and information that a company generates and consumes today can become an organizational and logistical nightmare. Storing data, integrating it and protecting it, so that it can be accessed in a fluid, fast and remote way, is one of the fundamental pillars for the successful management of any company, both for productive reasons and for being able to manage and give an effective response to the customers.

Good big data management is key to compete in a globalized market. With employees, suppliers and customers physically spread across different cities and countries, the better the data is handled in an organization, the greater its ability to react to market demand and its competitors.

Databases are nowadays an indispensable pillar to manage all the information handled by an organization that wants to be competitive. However, at a certain point of development in a company, when growth is sustained and the objective is expansion, the doubt faced by many managers and system administrators is whether they should continue to use a database system, or if they should consider the leap to a data warehouse. When is the right time to move from one data storage system to another?

Write a program that repeatedly accepts as input a string of ACGT triples and produces a list of the triples and the corresponding amino acids, one set per line. The program will continue to accept input until the user just presses ENTER without entering any DNA codes.

Answers

Answer:

Explanation:

The following code is written in Python. I created a dictionary with all the possible gene combinations and their corresponding amino acids. The user then enters a string. The string is split into triples and checked against the dictionary. If a value exists the gene and amino acid is printed, otherwise an "Invalid Sequence" error is printed for that triple. The program has been tested and the output can be seen in the attached image below.

def printAminoAcids():

   data = {

       'TTT': 'Phe', 'TCT': 'Ser', 'TGT': 'Cys', 'TAT': 'Tyr',

       'TTC': 'Phe', 'TCC': 'Ser', 'TGC': 'Cys', 'TAC': 'Tyr',

       'TTG': 'Leu', 'TCG': 'Ser', 'TGG': 'Trp', 'TAG': '***',

       'TTA': 'Leu', 'TCA': 'Ser', 'TGA': '***', 'TAA': '***',

       'CTT': 'Leu', 'CCT': 'Pro', 'CGT': 'Arg', 'CAT': 'His',

       'CTC': 'Leu', 'CCC': 'Pro', 'CGC': 'Arg', 'CAC': 'His',

       'CTG': 'Leu', 'CCG': 'Pro', 'CGG': 'Arg', 'CAG': 'Gln',

       'CTA': 'Leu', 'CCA': 'Pro', 'CGA': 'Arg', 'CAA': 'Gln',

       'GTT': 'Val', 'GCT': 'Ala', 'GGT': 'Gly', 'GAT': 'Asp',

       'GTC': 'Val', 'GCC': 'Ala', 'GGC': 'Gly', 'GAC': 'Asp',

       'GTG': 'Val', 'GCG': 'Ala', 'GGG': 'Gly', 'GAG': 'Glu',

       'GTA': 'Val', 'GCA': 'Ala', 'GGA': 'Gly', 'GAA': 'Glu',

       'ATT': 'Ile', 'ACT': 'Thr', 'AGT': 'Ser', 'AAT': 'Asn',

       'ATC': 'Ile', 'ACC': 'Thr', 'AGC': 'Ser', 'AAC': 'Asn',

       'ATG': 'Met', 'ACG': 'Thr', 'AGG': 'Arg', 'AAG': 'Lys',

       'ATA': 'Ile', 'ACA': 'Thr', 'AGA': 'Arg', 'AAA': 'Lys'

   }

   string = input("Enter Sequence or just click Enter to quit: ")

   sequence_list = []

   count = 0

   gene = ""

   for x in range(len(string)):

       if count < 3:

           gene += string[x]

           count += 1

       else:

           sequence_list.append(gene)

           gene = ""

           gene += string[x]

           count = 1

   sequence_list.append(gene)

   for gene in sequence_list:

       if gene.upper() in data:

           print(str(gene.upper()) + ": " + str(data[gene.upper()]))

       else:

           print(str(gene.upper()) + ": invalid sequence")

printAminoAcids()

An engineer is designing an HTML page and wants to specify a title for the browser tab to display, along with some meta data on what tools the page should use. These items would best fit in which of the following sections

a. The element
b. The element
c. The

element
d. The

element

Answers

An HTML is made up of several individual tags and elements such as the head, body. form, frame and many more.

In an HTML page, the meta element and the title element are placed in the head element.

An illustration is as follows:

< head >

< title > My Title < /title >

 < meta charset="UTF-8" >

< / head >

The head element contains quite a number of elements and tags; some of them are:

metatitle stylescriptbase

And so on.

Hence, in order to use a meta-data element, the meta element has to be placed within the head element.

Read more about HTML elements at:

https://brainly.com/question/4484498

How to use the AI System ?

Answers

ANSWER:

· New artificial intelligence systems are being developed to help teachers administer more effective testing that could uncover some of these often-hidden conditions. Once they can be properly identified, educators can tap into the resources available for a learning disability. Students can use AI to give reliable feedback.

What is the iterative procedure of recursive and nonrecursive?

Answers

Answer:

nonrecursive

Explanation:

Your location has been assigned the 172.149.254.0 /24 network. You are tasked with dividing the network into 13 subnets with the maximum number of hosts possible on each subnet.

Required:
a. What is the dotted decimal value for the subnet mask?
b. How many additional bits will you need to mask in the subnet mask?

Answers

The subnet mask would be a 32-bit integer which is formed by assigning the host bits to all 0's and the networking bits to so many 1's.In this method, the subnetting separates the IP address between host and network addresses.The subnet mask covers an IP address with its 32-bit number, thus the term "mask".

Given:

Network IP address [tex]\bold{= 172.149.254.0 /24}[/tex]

Subnet numbers [tex]\bold{= 13}[/tex]

Calculating the borrow bits:

[tex]\to \bold{= ceil(\log_{2} 13) = 4 \ bits}[/tex]

a)

Calculating the dotted decimal value for the subnet mask:

[tex]\to \bold{11111111.11111111.11111111.00000000}\\\\\to \bold{255.255.255.240}\\\\[/tex]

b)

The additional bits which will be needed to mask the subnet mask that is = 4.

Learn more: brainly.com/question/2254014

advantages of computational skill

Answers

Explanation:

algorithmic thinking - developing a set of instructions or sequence of steps to solve a problem;

evaluation - ensuring a solution is fit-for-purpose;

decomposition - breaking a problem down into its component parts;

What is system software? Write its types.​

Answers

Answer:

There are two main types of software: systems software and application software. Systems software includes the programs that are dedicated to managing the computer itself, such as the operating system, file management utilities, and disk operating system (or DOS)

Answer:

There are two main types of software: systems software and application software. Systems software includes the programs that are dedicated to managing the computer itself, such as the operating system, file management utilities, and disk operating system (or DOS)

Explanation:

thanks for question

Neymar machine that Run on electricity

Answers

"Neymar" = "name a"?

if so, well, there are many, like the little glowing box you use the type questions to the brainliest community, let it be a phone, a pc, or a molded Nintendo

if you meant Neymar indeed, I'm not sure if he runs on electricity, unless he is a soccer playing android somehow.

Other Questions
the hydrometer with the density of liquid to be 800 kg metre per square is the volume of the submerged part of the hydrometer is 5 into 10 to the power minus 5 calculate the mass of the hydrometer HELP! How is the mass number of an atom calculated?A - total number of electronsB - total number of protonsC - protons plus neutronsD - electrons plus neutrons Simplify: 4(b+6)2b(14b A converging lens of focal length 20cm, forms a real image twice the size of the object. Calculate: i) the power of the lens; ii) the position of the image. Read this excerpt from a passage."Her purchase got me thinking about the early days of online shopping, when people were anxious about orderingmerchandise from the Internet. What if the items never arrived? Was putting all my personal information online safe? Should Ireally disclose my credit card information to some unknown entity? Is this online company legitimate? And last but not least,who would buy something without seeing it first? But my grandmother's transaction made it clear: online shopping hasbecome as commonplace as brushing your teeth."As millions of consumers flock to online shopping, I wondered how and why people make the decision to shop online orin person. To get a better understanding of how e-commerce has affected our buying decisions, I decided to gain some insightfrom friends and family. The reviews were varied but insightful."Which of the following subjects will be compared in the rest of the passage?o delivery to a home and delivery to a storeO shopping online and shopping in personO online shopping and brushing your teethO prices of items online and prices of items in storesP Hi there :D ! Can someone help me with my english homework please? Find the distance between the two points.(-5,1)(0,0)[?]Enter the number thatgoes beneath theradical symbol. What role does religion play in Asimovs life? How does he undergo a spiritual transformation in the story A patient complains of feeling dizzy and faint when the patient care technician enters the room. While inquiring about the patients symptoms, the patient suddenly faints. What should the patient care technician have done when the patient complained of dizziness? What should the technician do after the patient had fainted? i have 17 coins. N of them are nickels and the rest are dimes. write an expression in two different ways for the amount of money that i have How would youchange the hypothesis if mussels died inboth aquariums? a trader is given 15% discount on goods bought from a factory. If the original price of an item in the factory is 45000. Calculate the amount the trader paid for them What is the formula for the volume of a pyramid?V = r2hV = 3/4r2hV = 1/3r2hV = 1/3Bh Please help ASAP!!!!! I would really appreciate it According to Newton's third law of physics, who would have strong muscles: a long-distance runner or a runner who jumps hurdles? Geometry, please answer question ASAP how did Asian Americans, Hispanic Americans, Women, and Dissenters react to the way they were treated in World War 1 Help me please.. Choose the letter A, B, C or D the word that has the underlined part different from others. A. Cultural. C. LandlineB. Interact. D. Language If A=(prime number less than 10)list the element of set A and find n(A)