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

Write a python program that takes 2 inputs from the user. The first input is a string and the second input is a letter. The program should remove all occurences of the letter from the given string and print the output. If the letter is not found in the string and the length of string is greater than 3, then remove the first letter and last letter of the given string and print it. Otherwise print the string as it is. You can assume that all the input will be in lowercase letter.

=====================================================================

Sample Input 1:

tanjiro kamado a

Sample output 1:

tnjiro kmdo


Write a Python program that will take one input from the user made up of two strings separated by a comma and a space (see samples below). Then create a mixed string with alternative characters from each string. Any leftover chars will be appended at the end of the resulting string.



Hint: For adding the leftover characters you may use string slicing.



Note: Please do not use lists for this task.



=====================================================================



Sample Input 1:


ABCD, efgh



Sample Output 1:


AeBfCgDh

Let us now try comparing two numbers by letting the user input two different numbers and say "Greater" if the first inputted number is greater than the second one, and "Lesser" if it’s the other way around.

Let's go!


Input

A line containing two different numbers separated by a space.

1.2·1.02

Output

A line containing a string.

Greater






1. The total number of missing values within the dataset.

 

2. Which column / feature requires correction in the type of value they hold?

 

3. After imputation of nulls with mean what is the average value of the compressive strength in concrete?

4. The feature that has a moderately strong relationship with compressive strength in concrete is?

5. Standardize the dataset using standardscaler(), split the dataset into train and test of proportions 70:30 and set the random state to 1. Build a Linear Regression Model on the data and the resulting r-squared value is between which range?


Create a program that identifies if the entered number is divisible by 7.Use tbe mod operator


Create a program that identifies if the entered number is am odd number.Use the mod operator


Create a program that asks the user to guess the color.


Create a mini quiz game program that asks the user three question.The starting score is 10 points.If the answer is incorrect,1poing is deducted from the score

Write the python program using only the import CSV to display the following:

  1. Count and display the number of cities per country.
  2. Count and display the country which is a member of the EU (EU = yes) and not a member of the EU (EU = no).
  3. Find and display the country with the highest and lowest total population.
  4. Count and display the country with a coastline (coastline = yes) and without a coastline (coastline = no)


https://drive.google.com/file/d/1OnN0RCvpVJ3A4x02DAOxWNSxJwJmJfm9/view?usp=sharing


NOTE:

DON'T USE ANY DIFFERENT MODULE, JUST IMPORT CSV

In or Out

by CodeChum Admin

I'm quite into games now, so how about we play In or Out! When a given number is even, the team scores so we shall print "In", but if it's not an even number, then we print "Out". Simple, right?


Now let's get this game started.


LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS