Questions: 5 831

Answers by our Experts: 5 728

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

How to set a background using python tkinter
Eg: sequence like RMDC
For r green color m red color d blue color c gold color

Make a program that will accept an integer and loop from 1 to that integer. Then, print all numbers from that range that are greater than 3.


Armstrong numbers between two intervals


Write a program to print all the Armstrong numbers in the given range


A to B(including A and B). An N-digit number is an Armstrong number if the number equals the sum of the Nth power of its digits.


Input


The first line has an integer


A. The second line has an integer B.


Output


Print all Armstrong numbers separated by a space.

If there are no Armstrong numbers in the given range, print


-1.


Explanation


For


A = 150 and B = 200


For example, if we take number 153, the sum of the cube of digits


1, 5, 3 is


13 + 53 + 33 = 153.


So, the output should be


153.


Sample Input 1

150

200

Sample Output 1

153

Sample Input 2

1

3

Sample Output 2

1 2 3


please provide correct output in sample output 2


please provide correct output in sample output 3


the above output 3

input=10

input=15


More Loops: All versions of foods.py in this section have avoided using for loops when printing to save space. Choose a version of foods.py, and write two for loops to print each list of .
foods?

• Write a function for checking the speed of drivers. This function

should have one parameter: speed.

• If speed is less than 70, it should print "Ok".

• Otherwise, for every 5km above the speed limit (70), it should give

the driver one demerit point and print the total number of demerit

points. For example, if the speed is 80, it should print: "Points: 2"

• If the driver gets more than 12 points, the function should print:

"License suspended"


6. "Even" Now

by CodeChum Admin

I'm really fond of even numbers, you know? That's why I'll be letting you make another even number problem yet again. This time, you need to print from a range of two inputted numbers, n1 and n2 (inclusive), all the even numbers from n2 down to n1, in descending order.

How about that?


Input


7. Factorials

by CodeChum Admin

For those of you who may not now, a factorial is a product of multiplying from 1 until the number. Now, you must make a program that will accept an integer and then print out its factorial using loops.

Are you up for this task?



8. The GCD

by CodeChum Admin

The greatest common divisor, also known as GCD, is the greatest number that will, without a remainder, fully divide a pair of integers.


Now, I want you to make a program that will accept two integers and with the use of loops, print out their GCD. Make good use of conditional statements as well.

Off you go!


Fibonacci sequence is defined with an integer n as,

F(n)=F(n-1)+F(n-2) for n ≥2,where F(0)=0,F(1)=1.

develop a Python program to compute F(n) for a given integer between 0 and 20.

Input: Output:

0≤n≤20 F(n)≤2 to the power32

Compute F(n) starting with n=2 and increment iteratively until the required value is obtained.

instructions-

Create a text file include the value ofn. The text file needs to saved in same folder

where the source file has been saved. The file name will be given as input through terminal.

Develop a function named“getNum"to read number n from file.

Develop a function named “show” to display the given value n and computed value

of F(n) on screen. (Expected output format Fibonacci(3) = 2)

Develop a function “saveFile” to write what was displayed in (3) above to a text

file named"result.txt”. This file should be in same folder where source file is.

program must call suitable functions to do the task.

if n>20 print invalid


Write a loop over the strings in list test_miss and call missing_letters with each string. Print a line for each string listing the missing letters. For example, for the string "aaa", the output should be the following.

aaa is missing letters bcdefghijklmnopqrstuvwxyz

If the string has all the letters in alphabet, the output should say it uses all the letters. For example, the output for the string alphabet itself would be the following.

abcdefghijklmnopqrstuvwxyz uses all the letters

Print a line like one of the above for each of the strings in test_miss.

Submit your Python program. It should include the following.

The provided code for alphabet, test_dups, test_miss, and histogram.
Your implementation of the has_duplicates function.
A loop that outputs duplicate information for each string in test_dups.
Your implementation of the missing_letters function.
A loop that outputs missing letters for each string in test_miss
LATEST TUTORIALS
APPROVED BY CLIENTS