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
alexandr402 [8]
2 years ago
10

Write a python program to accept a number and check whether it is divisible by 4 or not​

Computers and Technology
1 answer:
Alenkasestr [34]2 years ago
5 0

Answer:

number = int(input("Enter number: "))

if (number % 4):

 print("{} is not divisible by 4".format(number))

else:

 print("{} is divisible by 4".format(number))

Explanation:

If the %4 operation returns a non-zero number, there is a remainder and thus the number is not divisable by 4.

You might be interested in
Match the following.
vitfil [10]

Answer:

1192783728439

Explanation:

3 0
3 years ago
PLZ HELP ME ITS URGENT PlZ PLZ PLZ
Lubov Fominskaja [6]

Answer:

#include <stdio.h>

void main()

{

int num;

printf("Input a number :");

scanf("%d", &num);

if (num >= 0)

printf("%d is a positive number \n", num);

else

printf("%d is a negative number \n", num);

}

Explanation:

good luck.

hope it helped you.

pls mark brainleist

8 0
3 years ago
C programming question:
denpristay [2]

Answer:

You should do this:

if (0==strcmp(modelName,"Extravagant") && modelYear >= 1999 && modelYear <= 2002)

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

Explanation:

Lets consider this program and analyze the output.

int main()

{

int modelYear;

char modelName[30];

printf("enter the year");

scanf("%d",&modelYear);

printf("enter the modelname");

scanf("%s",modelName);

if (0==strcmp(modelName,"Extravagant") && modelYear >= 1999 && modelYear <= 2002)

printf("%s\n","RECALL");    }

if (0==strcmp(modelName,"Extravagant") && modelYear >= 1999 && modelYear <= 2002)

This statement has a function strcmp  which is used to compare two strings.

If the user enters Extravagant as model name then this input will be compared by the string stored in modelName i.e. Extravagant, character by character. If the string entered by the user matches the string stored in modelName this means this part of the if condition evaluates to true. 0==strcmp means that both the strings should be equal.

The next part of the if statement checks if the model year entered is greater than or equal to 1999 AND less than or equal to 2002. This means that the model year should be between 1999 and 2002 (inclusive).

&& is the logical operator between both the parts of if statement which means that both should evaluate to true in order to display RECALL.

This is correct way to use because the if (modelName == "Extravagant" && modelYear >= 1999 && modelYear <= 2002)  printf("%s\n","RECALL"); statement will not display RECALL. After entering the model name and model year it will move to the next line and exit.

So in if (0==strcmp(modelName,"Extravagant") && modelYear >= 1999 && modelYear <= 2002)

printf("%s\n","RECALL"); statement when the if condition evaluates to true, then RECALL is displayed in the output.

6 0
3 years ago
Why is it important to brain storm and develop concepts prior to selecting an idea that you wish to move forward with as a solut
kupik [55]

Answer:

Brainstorming helps you develop creative solutions to a problem, and is particularly ... And while it's important to start with a structured, analytical process when solving ... However, you may not develop ideas as fully when you're on your own, because ... To get the most out of your individual brainstorming session

4 0
3 years ago
How is technology closely linked to creativity
Travka [436]
Because there are many ways to deal with it or to do it and there are many different things
6 0
3 years ago
Other questions:
  • Which topology enables only one person, at one time, to send data to others on the network?
    6·1 answer
  • Excel assigns the name ____ to the first excel table created in a workbook.
    10·1 answer
  • 1. Zack sees an online contest. He could win $10,000 instantly! On the sign-up form, he enters his name and email address. He is
    15·1 answer
  • Which of the following is NOT one of the modules of a typical Decision Support System (DSS)? Select one: a. Customer information
    14·2 answers
  • What is the importance of human flourishing to science and technology?​
    8·1 answer
  • This finding maximum number function will keep on going until we reach at the last value
    12·1 answer
  • What is the value of the variable result after these lines of code are executed?
    11·1 answer
  • Write a description of the photograph to someone who cannot see the photograph. Be sure to include the title of the photograph a
    5·1 answer
  • Write a boolean expression that is true if s references the string end.
    8·1 answer
  • How do you give people a brianly i am knew as u can tell
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!