Write a function solution that given a three digit integer N and Integer K, returns the maximum possible three digit value that can be obtained by performing at most K increases by 1 of any digit in N
Submit your Python script file in the posting of your assignment. Your Python script should be either a .txt file or a .py file.
You must execute your script and paste the output produced into a document that you will submit along with your Python script.
It is very helpful if you print a placeholder between the printing of 9 lines and the printing of 25 lines. It will make your output easier to read for your peer assessors. A placeholder can be output such as “Printing nine lines” or “Calling clearScreen()”.
The following items will be used in the grading rubric for this assignment. Make sure that you have addressed each item in your assignment.
Does the assignment implement new_line, three_lines, nine_lines, and clear_screen functions, as well as a main section of the program which calls the functions?
Write a function in this file called nine_lines that uses the function three_lines (provided below) to print a total of nine lines.
Now add a function named clear_screen that uses a combination of the functions nine_lines, three_lines, and new_line (provided below) to print a total of twenty-five lines. The last line of your program should call first nine_lines and then the clear_screen function.
The function three_lines and new_line are defined below so that you can see nested function calls. Also, to make counting “blank” lines visually easier, the print command inside new_line will print a dot at the beginning of the line:
def new_line():
print('.')
def three_lines():
new_line()
new_line()
Sum of prime numbers in the input
Given an integer N as input, write a program to print a number diamond of 2*N 1 rows as shown below. Note: There is a space after each number. Input The first line of input is an integer N . Explanation In the given example, the number of rows in the diamond is 5 . So, the output should be Sample Input 1 5 Sample Output 1 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 1 2 3 4 1 2 3 1 2
write a program print of all anti diagonals element of matrix
A person to buy s shoes. Well, turns out there are only m shoes left in the shop. Determine the number of ways by which you can choose s shoes out of the available shoes in the shop. Print the answer in one line.
Write a programme that takes in a number from a user then prints out all the divisors greater than zero but less than the number itself
You are given a word as input. Print the input by adding a hyphen (-) between each letter in the word.
The input is a string
Sample input == Hello
Output == H-e-l-l-o
Write a Python program to count integer in a given mixed list.
Original list:
[1, 'abcd', 3, 1.2, 4, 'xyz', 5, 'pqr', 7, -5, -12.22]