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
Y_Kistochka [10]
3 years ago
11

2.13 LAB: Branches: Leap Year

Computers and Technology
1 answer:
Neporo4naja [7]3 years ago
5 0

Answer:

The program in Python is as follows:

year = int(input("Enter a year: "))

print(year,end=" ")

if year % 4 == 0:

  if year % 100 == 0:

      if year % 400 == 0:           print("is a leap year")

      else:           print("is not a leap year")

  else:       print("is a leap year")

else:   print("is not a leap year")

Explanation:

This gets input for year

year = int(input("Enter a year: "))

This prints year, followed by a blank

print(year,end=" ")

If year is divisible by 4

if year % 4 == 0:

If yes, check if year is divisible by 100

  if year % 100 == 0:

If yes, check if year is divisible by 400; print leap year if true

      if year % 400 == 0:           print("is a leap year")

print not leap year if year is not divisible by 400

      else:           print("is not a leap year")

print leap year if year is not divisible by 100

  else:       print("is a leap year")

print leap year if year is not divisible by 4

else:   print("is not a leap year")

You might be interested in
Part 2: Code the Program
OverLord2011 [107]

Answer:

# Name - Today's Date

# Description

def main():

    print("My favorite TV show is Mythbusters.")

    print("I like it because I learn a lot and they do crazy experiments.")

main()

(this is the best I can do since it's a specific result based on the choices you make, but I did the example code and you just need to fill it in with the necessary requirements. I also tested it on IDLE. )

8 0
3 years ago
How should students approach the decision to take the SAT or the ACT?
Vikentia [17]

Answer:

I believe that the only way to really make an informed decision as to which test is a better fit for you is to take a full-length diagnostic exam for both the ACT and the SAT before doing any prep. I also would look at the pros and cons for each test.

I personally took the ACT because there is <em>NO PENALTY </em>for guessing on the test. An educated guess won't hurt your score on the ACT.

6 0
3 years ago
A deluxe meal, represented by a DeluxeMeal object, includes a side dish and a drink for an additional cost of $3. The DeluxeMeal
STALIN [3.7K]

Answer:

DeluxeMeal burritoCombo = new DeluxeMeal ("burrito", "chips", "Lemonade", 7.49);

Explanation:

The above statement will be inserted in the software and the result will show the Deluxe meal details such as burrito which is an entrée, chips are side dish and lemonade is a drink. The cost of single burrito is 7.49 so with the meal the cost will be $3 higher which means the total cost will be $10.49

4 0
3 years ago
Find each of the following products using distributive property a) 735 × 16​
Alekssandra [29.7K]

Answer:

735 * 16 = 11760

Explanation:

Given

735 * 16

Required

The product using distributive property

Express 16 as 10 + 6

735 * 16 = 735 * (10 + 6)

Distributive property states that:

a * (b + c) = a * b + a * c

So, the expression becomes

735 * 16 = 735 * 10 + 735 *6

Evaluate each product

735 * 16 = 7350 + 4410

735 * 16 = 11760

8 0
3 years ago
Pseudocode is an improvement over the IPO chart because it lays out the a0 sequence of steps for a particular program.
Olegator [25]

Answer:

Yes. Pseudocode is an improvement over the IPO chart because it lays out the sequence of steps for a particular program

Explanation:

The input–process–output (IPO) chart is a widely used approach in systems analysis and software engineering for describing the structure of an information processing program or other process. The chart has three components (Input, Process and Output), and you write the description of each component in plain English, not code or mathematical formulas.

Pseudocode is a procedure for solving a problem in terms of the actions to be executed and the order in which those actions are to be executed.

Pseudocode is an improvement over the IPO chart because it shows the step by step sequence to be followed by a particular program unlike the IPO chart which just break the program into Input, Process and Output.

6 0
3 years ago
Other questions:
  • Which rock band apologized for automatically adding its new album to every iPhone 6 in 2014
    8·2 answers
  • What is one of the benefits of using templates for your email marketing campaigns?
    10·1 answer
  • Write and test a Python program to find and print the largest number in a set of real (floating point) numbers. The program shou
    5·1 answer
  • A network technician is attempting to add an older workstation to a Cisco switched LAN. The technician has manually configured t
    11·1 answer
  • Netflix shows to watch?
    11·2 answers
  • The command to get out of the loop.<br>a.<br>i exit<br>ii. break<br>iii. comment<br>iv. for​
    12·1 answer
  • If you wanted to make the system sequentially consistent, what are the key constrains you need to impose
    6·1 answer
  • You can fit more RAW files on a memory card than JPEG files. true or false
    10·1 answer
  • Write a function SwapArrayEnds() that swaps the first and last elements of the function's array parameter.
    6·1 answer
  • I want to get an output picture in python but it says this. I'm using turtle
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!