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

Striped Rectangle

Given an integer number

M, N as input. Write a program to print a striped rectangular pattern of M rows and N columns using (+ and -) character.Input

The first line of input is an integer

M. The second line of input is an integer N.Explanation

In the given example the striped rectangular pattern of

7 rows and 5 columns. Therefore, the output should beĀ 


Sum of Even numbers

Write a program to find the sum of even numbers in first N natural numbers.

Input

The input is an integer N.

Output

The output should be an integer containing the sum of even numbers upto the given number.

Explanation

In the given example

N = 5, the even natural numbers below 5 are 2, 4 Then total = 2 + 4

So, the output should be

6.


Remove Vowels in a Sentence

You are given a sentence. Write a program to remove all the vowels in the given sentence.

Note: Sentence has both lowercase and uppercase letters.Input

The first line of input is a string

N.Explanation

In the example given a sentence

Hello World, the sentence contains vowels e, o.So, the output should be

Hll Wrld


Letter, Digit or Special Character

You are given a character as input. Check if the given input is a

Lowercase Letter or Uppercase Letter or Digit or a Special Character.Input

The first line of input is a single character

N.Explanation

In the given example character is

9. So, the output should be Digit.


Palindrome - 3

You are given a string, write a program to find whether the string is palindrome or not.

Note: Treat uppercase letters and lowercase letters as same when comparing letters. Ignore spaces and quotes within the string.Input

The first line of input is a string.

Output

The output should be

True or False.Explanation

In the given example, the string

No lemon no melon is a palindrome as we are ignoring spaces. So, the output should be True.


Write a function in this called nine_lines that uses the function three_lines to print a total of nine lines .


Show what happens when a variable defined outside a function has the same name as a local variable inside a function . Explain what happens to the value of each variable as the program runs .


Create a function that takes an argument . Give the function parameter a unique name . Show what happens when you try to use that parameter name outside the function. Explain the results.


Call your function with a local variable . Show what happens when you try to use that variable outside the function . Explain the results.


Create a python code that defines a function that takes an argument . Call the function. Identify what code is the argument and what code is the parameter .Call the function three times with different kinds of arguments : a value , a variable , and an expression . Identify which kind of argument is which .


LATEST TUTORIALS
APPROVED BY CLIENTS