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
I am a bacterium. I cause stomach cramps and diarrhea. I am caused by eating rotten foods
ZanzabumX [31]

I think it's salmonella. : )

4 0
3 years ago
Read 2 more answers
Why do people on Brainly verify answers that are wrong. I got 90% and 80% percent on my tests because of it
Bezzdna [24]
I feel that, you can’t trust it.
3 0
3 years ago
Read 2 more answers
For this lab you will do 2 things:
zepelin [54]

Answer:

Here is the Python program:

COOKIES_PER_BAG = 40 #sets constant value for bag of cookies

SERVINGS_PER_BAG = 10 #sets constant value for serving in bag

CALORIES_PER_SERVING = 300 #sets constant value servings per bag

cookies = int(input("How many cookies did you eat? ")) #prompts user to input how many cookies he or she ate

totalCalories = cookies * (CALORIES_PER_SERVING / (COOKIES_PER_BAG / SERVINGS_PER_BAG)); #computes total calories consumed by user

print("Total calories consumed:",totalCalories) #displays the computed value of totalCalories consumed

Explanation:

The algorithm is:

  • Start
  • Declare constants COOKIES_PER_BAG, SERVINGS_PER_BAG and CALORIES_PER_SERVING
  • Set COOKIES_PER_BAG to 40
  • Set SERVINGS_PER_BAG to 10
  • Set CALORIES_PER_SERVING to 300
  • Input cookies
  • Calculate totalCalories:                                                                                                                       totalCalories ← cookies * (CALORIES_PER_SERVING / (COOKIES_PER_BAG / SERVINGS_PER_BAG))
  • Display totalCalories

I will explain the program with an example:

Lets say user enters 5 as cookies he or she ate so

cookies = 5

Now total calories are computed as:

totalCalories = cookies * (CALORIES_PER_SERVING / (COOKIES_PER_BAG / SERVINGS_PER_BAG));  

This becomes:

totalCalories = 5 * (300/40/10)

totalCalories = 5 * (300/4)

totalCalories = 5 * 75

totalCalories = 375

The screenshot of program along with its output is attached.

4 0
3 years ago
I don’t understand the double8 coding problem. It is Java
sergeinik [125]
Ask someone who knows about this stuff this is weird I would say look it up maybe
7 0
3 years ago
What could be one possible reason where the recipient is not guaranteed that the data being streamed will not get interrupted?
anyanavicka [17]

Answer

The senders PC is using UDP protocol

Explanation

UDP is the User Datagram Protocol which is used as an alternative communication protocol to the TCP which is used primarily for establishing low latency and loss of tolerating connections between applications on the internet UDP is normally used by the programs running on different computers on a network. Its purposes is to send short messages which are datagrams. It is not much reliable because of its occasional loss of packet. Due to this packet loss  the recipient is not guaranteed that the data being streamed will not get interrupted. This is because If a router on the Internet starts getting overloaded, or a packet gets corrupted due to interference or anything, the packet will be dropped unlike the TCP (Transmission control  protocol)which resend the packets and keeps re sending. The UDP does not resend the packets which are dropped. Once they are dropped that all.


3 0
3 years ago
Other questions:
  • Which word most strongly appeals to pathos?
    15·1 answer
  • i have a bag of trail mix . one half of the bag is peanuts. 1/4 of the bag is chocolate candies , and 1/4 of the bag is died fru
    15·1 answer
  • 1. What conversion factor should be used to convert from Gigaliters to liters?
    14·1 answer
  • Is ubisoft still making assassins creeds on xbox 360
    8·2 answers
  • What makes iron man different from other superheroes ? why is iron man the best superhero ??
    5·2 answers
  • How do you get banned? By getting reported? Or do admins watch whats posted?
    9·1 answer
  • Describe 2 health risks posed by computers
    8·1 answer
  • Http://www.alegrium.com/sgi/2/eibder
    5·1 answer
  • A small startup company has hired you to harden their new network. Because funds are limited, you have decided to implement a un
    8·1 answer
  • A laptop can be kept on palm to work. [true/false) ​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!