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
Ganezh [65]
2 years ago
5

Write a python program to check whether the number is divisible by 7. If its divisible, print its divisible otherwise find previ

ous number and the next number which is divisible by 7​
Computers and Technology
1 answer:
Stells [14]2 years ago
7 0

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

if(f%7==0):

   print("It's divisible by 7.")

else:

   if(f<7):

       print("7")

   else:

       print(str(f-(f%7))+", "+str(f+(7-(f%7))))

You might be interested in
A person interested in a career in digital media should have which qualities? Select all that apply.
emmainna [20.7K]
1.Creativity
2.Leadership
3.Attention to detail
5.Enjoyment to learning new things!
6.Vision
No Problem!
5 0
3 years ago
Write a script that prints the multiples of 7 between 0 and 100. Print one multiple per line and avoid printing any numbers that
Sedbober [7]

Answer:

The program to this question can be described as follows:

Program:

#include <iostream> //defining header file

using namespace std;

int main() //defining main method

{

int x; //defining integer variable

for(x=0;x<=100;x++) //defining loop to count value from 0 to 100

{

   if(x%7==0) //check value is divisable by 7

   {

       cout<<x<<endl; //print value

   }

}

   return 0;

}

Output:

please find the attachment.

Explanation:

In the above code, an integer variable x is declared, which is used in the for loop, in this loop variable  "x" starts from 0 and ends when the value of x is less than and equal to 100.

  • Inside the loop an, if block is used that defines a condition that is (i%7==0), it will check, that the value is divided by 7.
  • In this loop, a print method is used, that prints its values.

8 0
3 years ago
What is cloud computing?
Luba_88 [7]
According to google, cloud computing. <span>the practice of using a network of remote servers hosted on the Internet to store, manage, and process data, rather than a local server or a personal computer.</span>
4 0
3 years ago
What icon might you see in device manager that indicates a problem with a device?
Nataly_w [17]
A yellow triangle with a exclamation mark might appear if a problem is detected with the device. Of course, this is different depending on the version of Windows you have.
7 0
4 years ago
Hello! I have a few extra points! who wants them?​
N76 [4]

Answer:

Explanation:

Me plz ty

8 0
3 years ago
Read 2 more answers
Other questions:
  • SP 800-14, Generally Accepted Principles and Practices for Securing Information Technology Systems, provides best practices and
    9·2 answers
  • he fundamental building block in every Hypertext Markup Language (HTML) document is the _____ tag, which marks a component in th
    7·1 answer
  • A(n) monitoring vulnerability scanner is one that listens in on the network and determines vulnerable versions of both server an
    7·1 answer
  • Dashed lines that display on your slide when you are moving an object and that assist you with alignment are referred to as:
    12·2 answers
  • In 1-2 sentences, describe some keyboard shortcuts you have used during this lesson to save you time.
    13·2 answers
  • How can you skillfully use the internet for research
    7·1 answer
  • How does the post process alert the user if it detects a hardware problem during the post process?
    6·1 answer
  • What is a type of machine-to-human communication?
    14·1 answer
  • Please help it would mean to world to me❤️ (WORD)
    13·1 answer
  • Assume the user responds with a 3 for the first number and a 4 for the second number.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!