Question

Q) How many seven digit numbers are divisible by 7? Write a function that prints a...

Q) How many seven digit numbers are divisible by 7? Write a function that prints a list with all seven digit number divisible by 7
Q) Write a function called removeMin() that removes the minimum value from a list. You cannot use the min function nor the remove method. If a list has more than one copy of the minimum value, remove only the first occurence.
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Code and output

Code for copying

list1=[]
count=0
for i in range(1000000,9999999):
    if i%7==0:
        list1.append(i)
        count+=1
print(list1)
print("total numbers ={}".format(count))

======================================================

Add a comment
Know the answer?
Add Answer to:
Q) How many seven digit numbers are divisible by 7? Write a function that prints a...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Write a program that prints all the 3 digit numbers that are divisible by 17

    Write a program that prints all the 3 digit numbers that are divisible by 17

  • C++ ONLY Write a function calculator that takes two floating numbers and one operator and prints...

    C++ ONLY Write a function calculator that takes two floating numbers and one operator and prints out the answer based on arithmetic. Assume that there are no overflow, underflow and division by zero cases. Your function should be named calculator Your function takes three input parameter: two double numbers and one char operator Your function does not return anything Your function prints answer in the format specified below Your function should set precision point to 2 Note: You must use...

  • You are required to write an interactive program that prompts the user for seven (7) real...

    You are required to write an interactive program that prompts the user for seven (7) real numbers and performs the following tasks: Reads and stores the numbers into one-dimensional array called A. Calculates the sum of the numbers. Find the average of the numbers. Finds the smallest value of the numbers. Prints all the results with proper headings. Program requirements: -     The program must contain at least five functions using necessary parameters. These functions should read the data, perform the...

  • Write a C program which calculates how many digits a number has and prints each digit...

    Write a C program which calculates how many digits a number has and prints each digit in reserve order with space in between(no space after the last digit). The number > 0 and has no more than 5 digits. (optional] It is better to write two functions. One is designed for printing number in reverse order and the other is for counting the number of digits. Given that the value of number (which is an int variable) is 12345, the...

  • Write a c++ program that reads numbers from the user, and prints a table showing how...

    Write a c++ program that reads numbers from the user, and prints a table showing how many times each digit appears in each number. The user should be able to enter more than one number to be tested for repeated digits. The program should terminate when the user enters a number that is less than 0. Here is a sample output: Enter a number (-1 to end this loop): 41271092 Digit: 0 1 2 3 4 5 6 7 8...

  • 1. (a) (i) How many different six-digit natural numbers may be formed from the digits 2,...

    1. (a) (i) How many different six-digit natural numbers may be formed from the digits 2, 3, 4, 5, 7 and 9 if digits may not be repeated? (ii) How many of the numbers so formed are even? (iii) How many of the numbers formed are divisible by 3? (iv) How many of the numbers formed are less than 700,000? (b) JACK MURPHY’s seven character password consists of four let- ters chosen from the ten letters in his name (all...

  • using python Write a function that takes a dictionary and a list of keys as 2...

    using python Write a function that takes a dictionary and a list of keys as 2 parameters. It removes the entries associated with the keys from the given dictionary Your function should not print or return anything. The given dictionary should be modified after the function is called Note: it means that you can't create another dictionary in your function. Since dictionaries are mutable, you can modify them directly def remove_keys (dict, key_list) "" "Remove the key, value pair from...

  • Need some help with this java problem, thanks! Failure to submit will result in a ZERO...

    Need some help with this java problem, thanks! Failure to submit will result in a ZERO FOR THIS LAB. NO EXCEPTIONS. Write a program that prints out the lists alter the following methods are called. Method takes an of integers as a parameter. The method moves the minimum value in the list to the front, otherwise preserving the order of the elements. For example, if a variable called list stores the following values: [4. 7, 9, 2. 7, 7. 5....

  • PYTHON 1.Guessing many passwords: Write a function called guess_passwords. It doesn't take any arguments. It should use the function guess, trying out as many possible passwords as possible. Here...

    PYTHON 1.Guessing many passwords: Write a function called guess_passwords. It doesn't take any arguments. It should use the function guess, trying out as many possible passwords as possible. Here are some methods you might try: Try out a hardcoded list of strings that you think people might use as passwords. Try out all words in the word file. Try out all character combinations of length 4 or less (or more if you don't mind waiting). Try out combinations of words...

  • 1.Write a function called high_point that takes a list of integers and returns True if there...

    1.Write a function called high_point that takes a list of integers and returns True if there exists a value in the list that is bigger than the values immediately before and after it in the list. Your function must return False if no such value exists. The values in the beginning and the end of the list cannot be high points. (20 points) Test Cases: print(high_point([2,5,8,9,7,9])) True print(high_point([2,5,6,6,3])) False print(high_point([2,5,8,21,22])) False 2. Write a while loop to repeatedly ask for...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT