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
jeka94
3 years ago
5

Write an if/else statement that compares the variable age with 65, adds 1 to the variable seniorCitizens if age is greater than

or equal to 65, and adds 1 to the variable nonSeniors otherwise.
Computers and Technology
1 answer:
Oduvanchick [21]3 years ago
6 0

if age >= 65:

seniorCitizens = seniorCitizens + 1

else:

nonSeniors = nonSeniors + 1

You might be interested in
2) Please create a C program for the following: (25 points) a. Suppose the US dollar to Korean Won is 0.85 dollars to 1000 won.
Zanzabum

Answer:

In C:

#include <stdio.h>

int main(){

       float won,usd,rupee,dinar,peso;

       printf("Won: ");

       scanf("%f", &won);

       usd = won * 0.85/1000;

       rupee = won * 0.85 * 0.14/1000;

       dinar = won * 0.85 * 0.048/1000;

       peso = won * 0.85 * 1.41/1000;

       printf("USD = %f\n", usd);

       printf("Rupee = %f\n", rupee);

       printf("Dinar = %f\n", dinar);

       printf("Peso = %f\n", peso);

   return 0;

}

Explanation:

This declares all variables as float

float won,usd,rupee,dinar,peso;

This prompts the user for Korean Won

       printf("Won: ");

This gets the input for won

       scanf("%f", &won);

This converts to usd

       usd = won * 0.85/1000;

This converts to rupee

       rupee = won * 0.85 * 0.14/1000;

This converts to dinar

       dinar = won * 0.85 * 0.048/1000;

This converts to peso

       peso = won * 0.85 * 1.41/1000;

The next four lines print the converted currencies

       printf("USD = %f\n", usd);

       printf("Rupee = %f\n", rupee);

       printf("Dinar = %f\n", dinar);

       printf("Peso = %f\n", peso);

3 0
3 years ago
Why do we install doorbells in our house
Vinil7 [7]

Explanation:

It's placed near the door. When a visitor presses the button, the bell rings inside alerting you that someone is at the door.

6 0
3 years ago
Read 2 more answers
Write a calculator program that will allow only addition, subtraction, multiplication &amp; division. Have the
ozzi

num1 = float(input("Enter the first number: "))

num2 = float(input("Enter the second number: "))

operation = input("Which operation are you performing? (a/s/m/d) ")

if operation == "a":

   print("{} + {} = {}".format(num1, num2, num1+num2))

elif operation == "s":

   print("{} - {} = {}".format(num1, num2, num1-num2))

elif operation == "m":

   print("{} * {} = {}".format(num1, num2, num1*num2))

elif operation == "d":

   print("{} / {} = {}".format(num1, num2, num1/num2))

I hope this helps!

8 0
2 years ago
In which career does the level of education vary the most?
Ksenya-84 [330]
Journalism
all the best
3 0
3 years ago
Read 2 more answers
Will you benefit from understanding management principles even if you decide not to go into management
satela [25.4K]

Answer:

Yes

Explanation:

It says it.

5 0
3 years ago
Other questions:
  • There are about what licensed drivers here in Florida
    7·1 answer
  • What is an example of constructive criticism for an employee who is shy during meetings?
    15·2 answers
  • Which of these statements is true? Steve Jobs invented the mouse as an input device. Bill Gates invented the mouse as an input d
    6·1 answer
  • 4. True or False? Electrons flow out from the POSITIVE end of a battery. *<br> True<br> False
    7·1 answer
  • 6. While using the HTS, ________________ will help maintain a safe driving environment despite high speeds and a large number of
    12·1 answer
  • 6. The NADH and FADH2 produced during the Krebs cycle pass their electrons down the 7. __ __ __ __ __ __ __ __ __ __ __ __ __ __
    6·1 answer
  • Which of the following TCP/IP settings should be configured to specify DNS suffixes to use other than resolving names through a
    9·1 answer
  • Who created the first photograph
    9·2 answers
  • (fill in the blank) <br><br> ____ is when data is formatted, transmitted and received in a network.
    13·1 answer
  • In what ways are super computer different from mainframe computers.​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!