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]
Write a Python program that accepts a string and calculate thenumber of digits and letters
Sample Data : Python 3.9
Expected Output :
Letters 6
Digits 2
Write a Python program to convert temperatures to and from celsius, fahrenheit.
[ Formula : c/5 = f-32/9 [ where c = temperature in celsius and f = temperature in fahrenheit ]
Expected
Output :
60°C is 140 in Fahrenheit
45°F is 7 in Celsius