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

string = input("Enter any string: ")


if string == 'x':


exit();


else:


newstr = string;



vowels = ('a', 'e', 'i', 'o', 'u');


for x in string.lower():


if x in vowels:


newstr = newstr.replace(x,"");



print(newstr)



Every thing is correct,


Except,


In this we have remove uppercase letters also


So please make code for me

Multiplying two numbers is a piece of cake, but how about multiplying three of them, either being a negative of positive number? With programming and proper code, these tasks are easy to handle.







You're a programmer, right? Then code this one for me!





Input





A line containing three numbers (positive or negative, may have decimal places) separated by a space.





1.6·-2·-1




Output





A line containing a decimal/float with one decimal place.





3.2

for sample input2 i get 5 8 5 instead of 5 8 8


What is the output of the Python method call below?

"bib".find('b', 1, 2)


Hollow Right Triangle




Given an integer number N as input. Write a program to print the hollow right-angled triangular pattern of N lines as shown below.




Note:




There is a space after each asterisk ) character. *




Input




The first line of input is an integer




N




Explanation




In the given example the hollow right angled triangle of side 4 Therefore, the output should be




*




* *




*

IPL Match Details


Write a program that reads all the match outcomes and summarizes the information of all the matches.

Points are given to the terms based on the outcome of the match.

A win earns a team 3 points.A draw earns 1.A loss earns 0.

The following information is expected:

MP:Matches Played

W:Matches Won

D:Matches Drawn(Tied)

L:Matches Lost

P:Points


The team information should be displayed in descending order of points.


Sample input 1

6

CSK;RR;loss

RR;DD;draw

MI;KKR;win

KKR;RR;loss

CSK;DD;draw

MI;DD; draw


Sample output 1

Team: RR, Matches Played: 3, Won:  2, Lost:  0,  Draw:  1,  Points:  7

Team: MI, Matches Played: 2, Won:  1, Lost:  0,  Draw:  1,  Points:  4

Team: DD, Matches Played: 3, Won:  0, Lost:  0,  Draw:  3,  Points:  3

Team: CSK, Matches Played: 2, Won:  0, Lost:  1,  Draw:  1,  Points:  1

Team: KKR, Matches Played: 2, Won:  0, Lost:  2,  Draw:  0,  Points:  0


The dew point temperature Td can be calculated (approximately)from the relative humidity RH and the actual temperature T by


Td=bf(T, RH)/a.f(T, RH)



F(T, RH) =a.T/b+T + In(RH)



where a = 17.27 and b= 237.76



write a WAP that reads the relative humidity (bio 0 and 1) and the temperature ( in degrees C) and prints the dew point value..

You are required to implement a simple symbolic equation solver. The equation must be stored in a binary tree.



Each operand or operator should be stored as a tuple of the form (TYPE, VALUE).




For example: (OPERAND, 5), (OPERAND, 7), (OPERATOR, '*’').




Following operators should be supported: addition (+), subtraction (-), multiplication (*), and exponentiation .




Skeleton of this lab is given belo. Complete the bodies of the insert, and evaluate methods. Include your solution in the sections




*Input*



root = Node(('OPERAND', 1))



root = root.insert(('OPERATOR', '+'), False)



root = root.insert(('OPERAND', 2), False)



root = root.insert(('OPERATOR', '*'), True)



root = root.insert(('OPERAND', 3), False)



root = root.insert(('OPERATOR', '+'), False)



root = root.insert(('OPERAND', 3), False)



root = root.insert(('OPERATOR', '^'), False)



root = root.insert(('OPERAND', 2), False)



root.get_output()




*Expected output* = 100

Polynomial


Given polynomial,write a program that prints polynomial in Cix^Pi + Ci-1x^Pi-1+....+C1x+C0 format.


Input


The first line contains a single Integer N.

Next N lines contain two integers Pi,Ci separated with space, where Pi denotes power and Ci denotes coefficient of Pi.


Sample Input 1

5

0 2

1 3

2 1

4 7


Sample output 1

7x^4 + 6x^3 + x^2 + 3x + 2


Sample input 2

4

0 5

1 0

2 10

3 6


Sample output 2

6x^3 + 10x^2 + 5


Don't you find it amazing to discover words and sentences that have the same first and last letter? We just don't usually notice them, so we can try it out by coding out this problem instead! Print out "Yes" if the first and last characters of the given string are the same, and "No" otherwise. It doesn't matter if they're in lowercase or uppercase, as long as it's the same letter, it fits the description.

So, what are you waiting for? Code now!


LATEST TUTORIALS
APPROVED BY CLIENTS