Pick

0 XP Coin
Get 5 XP/pr challenges
0 Coin
0 LVL
Need 5 XP to Level up

Challenges

Flatten a list of lists using map.

Filter out None values from a list using map.

Use map to calculate the product of corresponding elements from two lists.

Round each float number in a list to two decimal places using map.

Use map to convert a list of numbers to 'Even' or 'Odd' based on their parity.

Use map to capitalize the first letter of each word in a list of strings.

Use a lambda function with map to square each number in a list of integers.

Apply a function using map to double each number in a given list.

Basic Mapping Very Easy

Use the map function to convert a list of integers to their corresponding strings.

Use a lambda function within a list comprehension to extract the last character of each string in a list.

Create a lambda function that takes one argument n and returns n squared, with a default value of 5 for n.

Sort a list of strings based on their length using a lambda function as the key.

Filter a list of strings to keep only those starting with 'A', and then convert them to uppercase using lambda functions.

Use a lambda function with reduce() to find the maximum number in a list.

Use a lambda function with map() to square each element in a list.

Filter a list of integers to get only even numbers using a lambda function.

Sort a list of tuples (name, age) based on the age using a lambda function.

Create a lambda function that checks if a given number num is even

Instructions: Define a lambda function that takes two arguments x and y and returns their sum.

Find the k-th largest element in an unsorted list.

Given a list of intervals, merge all overlapping intervals.

Given a list representing heights of walls, compute how much water can be trapped after raining.

Find the contiguous subarray within a list of integers that has the largest product.

Given a list of strings, group the anagrams together.

Given a list and a number X, find the smallest subarray with a sum greater than X.

Generate all possible subsequences of a given list.

Given an unsorted list of integers, find the length of the longest consecutive subsequence.

Rotate a given list to the right by k positions.

Convert a given list of integers into a zigzag pattern (a sequence where numbers are alternatively higher and lower).

Write a Python regular expression to extract the file extension from a list of filenames. The filenames may include paths and the extension is the substring following the last period.

Write a Python regular expression to replace all phone numbers in the format "(XXX) XXX-XXXX" with the string "[PHONE]". Assume the area code (XXX) and the rest of the number are always 3 digits and 4 digits, respectively.

Write a Python regular expression to find all hashtags in a given string. Hashtags start with the # symbol followed by alphanumeric characters and underscores.

Write a Python regular expression to validate a list of email addresses. The regex should match email addresses that follow the standard format: "username@domain.extension".

Write a Python regular expression to extract all dates in the format "DD/MM/YYYY" from a given string. Assume the day (DD) ranges from 01 to 31, month (MM) ranges from 01 to 12, and year (YYYY) ranges from 1900 to 2099.

Write a Function "Calculate_Fibonacci(num) which will take integer as input return Fibonacci Series as list

Functions Discussion

Write a Function "calculate_Palindrome(str1) which will take String as input return True if palidrome else return False

Functions Discussion

Function to Calculate Factorial of a Number:

Functions Discussion

Write a Function "calculate_Captilized(str1) which will take String as input return Capitalize First Letter of Each Word:

Functions Discussion

Write a Function "calculate_Max_list(list1) which will take list as input return maximum of The List:

Functions Discussion

Write a Function "calculate_prime(num) which will take integer as input return True if prime number False for not Prime Number

Functions Discussion

Write a Function "calculate_Reverse_list(list1) which will take list as input return Reverse of The List

Functions Discussion

Write a Function "calculate_vowel(str1) which will take String as input return count of vowels

Functions Discussion

Write a Function "Even_odd(num) which will take integer as input return Even or odd:

Functions Discussion

Write a Function "calculate_fact(num) which will take integer as input return Square of number:

Functions Discussion

Merge dict1 and dict2 such that conflicting keys take the value from dict2.

dictionary Discussion

Multiply each value in sample_dict by 2 and return the updated dictionary.

dictionary Discussion

Retrieve the value associated with the key "d" from sample_dict. If "d" does not exist, return 0.

dictionary Discussion

Retrieve the value associated with the key "b" from sample_dict.

dictionary Discussion

Return the number of items (key-value pairs) in sample_dict.

dictionary Discussion

Add a new key-value pair "d": 4 to sample_dict.

dictionary Discussion

Extract all values from sample_dict and return them as a list.

dictionary Discussion

Extract all keys from sample_dict and return them as a list.

dictionary Discussion

Check if the key `"b"` exists in `sample_dict`.

dictionary Discussion

Find the Most Frequent Character

Convert CamelCase to Snake_Case

Check if Anagram Select Level

a word or phrase that is made by arranging the letters of another word or phrase in a different order

Extract Initials Characters From Each String and create a new String

Remove All Digits

Three strings: the original string, the substring to find, and the substring to replace it with.

Find the Longest Word

Count Vowels in a String

Check for Palindrome

Reverse a String

Write a code that takes a tuple of tuples, where each inner tuple contains two integers, and prints a tuple with the product of the two integers in each inner tuple.

Write a code that takes a tuple of integers and prints the largest integer.

Write a code that takes a tuple of integers and prints a new tuple with the lengths of each integer.

Write a code that takes a tuple of integers and prints a new tuple with each integer incremented by 1.

Write a code that takes a tuple of numbers and prints the product of all the numbers.

Write a code that takes a tuple containing multiple tuples of integers and prints a new tuple with the sum of each inner tuple.

Write a code that takes a tuple of integers and prints a new tuple with the integers in reverse order.

Given two lists of integers, return a new list containing only the elements that are present in both lists.

Given a list of integers and a target integer, return the number of times the target integer appears in the list.

Given a list of numbers, return the product of all elements in the list.

Given a list of elements, return the list in reverse order.

Given a list of numbers, return the largest number in the list.

Given a list of integers, return a new list with duplicate elements removed.

Given a list of numbers, return the sum of all elements in the list.

Given a list of integers, return a list containing only the even numbers.

Write a loop to find the sum of squares of the first `n` natural numbers.

Write a loop to count all odd numbers between 1 and a given number `n`.

Write a loop to find the sum of the digits of a given number `n`

Write a loop to calculate the factorial of a given number `n`

Write a loop to find the sum of all even numbers from 1 to a given number `n`.

Given a string, write a loop to reverse the string.

Write a Python code that takes an integer `day_number` (1 through 7) as input and returns the corresponding day of the week, where 1 is "Monday" and 7 is "Sunday". If the input is not in the range 1 to 7, return "Invalid day number".

If and else Condition Discussion

Create a Python code that takes a floating-point number `num` as input and returns "Positive" if the number is greater than zero, "Negative" if the number is less than zero, and "Zero" if the number is zero.

If and else Condition Discussion

Create a Python code that takes a string `light_color` as input and returns a string indicating what action a driver should take based on the following traffic light colors: - "Red" means "Stop". - "Yellow" means "Caution". - "Green" means "Go". - Any other color should return "Invalid color".

If and else Condition Discussion

Write a Python code that takes a floating-point number `temp` representing temperature in Fahrenheit as input and returns: - "Freezing" if the temperature is less than 32°F. - "Cold" if the temperature is between 32°F and 50°F (inclusive). - "Moderate" if the temperature is between 51°F and 70°F (inclusive). - "Warm" if the temperature is between 71°F and 85°F (inclusive). - "Hot" if the temperature is above 85°F.

If and else Condition Discussion

Create a Python code that takes an integer `year` as input and returns `True` if the year is a leap year, and `False` otherwise. A leap year is divisible by 4 but not by 100, unless it is also divisible by 400.

If and else Condition Discussion

Write a Python code that takes three integers `num1`, `num2`, and `num3` as input and returns the largest of the three numbers.

If and else Condition Discussion

Create a Python code that takes a floating-point number `score` between 0 and 100 as input and returns the letter grade based on the following scale: - "A" for scores 90 and above. - "B" for scores from 80 to 89. - "C" for scores from 70 to 79. - "D" for scores from 60 to 69. - "F" for scores below 60.

If and else Condition Discussion

Write a Python code that takes an integer `number` as input and returns "Even" if the number is even, and "Odd" if the number is odd.

If and else Condition Discussion

Given an integer `age`, determine the life stage based on the following conditions: - "Child" if `age` is less than 13. - "Teenager" if `age` is between 13 and 19 (inclusive). - "Adult" if `age` is between 20 and 64 (inclusive). - "Senior" if `age` is 65 or older.

If and else Condition Discussion

Take The 2 values From user and Divide them

Variable Discussion

Please Take Three value From user and Avergae The value From it

Variable Discussion

Please Take Three value From user and Multiply The value From it

Variable Discussion

Please Take Three value From user and Substract The value From it

Variable Discussion

Please Take Three value From user and add The value From it

Variable Discussion

print The count of even numbers between 1 and 20.

File The Highest Ocuurence Zip code along With The Count in data File File Path :=> /root/data/user_data.txt

Text File Asssignment Discussion

How many different users belongs to unique professions ? File Path :=> /root/data/user_data.txt

Text File Asssignment Discussion

File Path :=> /root/data/user_data.txt Question1 :=> How many unique professions do we have in the data file? where First Column is id, second Column is age , Third Column is Gender, Fourth Column is professtion and Last column i =s Zip code

Text File Asssignment Discussion

create a List as Input and calculate a list of the accumulating sum. Example :=> # [1, 3, 6, 10] can be written as [1, 1 + 2, 1 + 2 + 3, 1 + 2 + 3 + 4]

Take a List and that calculate the sum of missing numbers from the given list. Notes The numerical range to consider when searching for the missing numbers in the list is the sequence of consecutive numbers between the minimum and maximum of the numbers (inclusive).

Take a List that determines whether elements in an array can be re-arranged to form a consecutive list of numbers where each number appears exactly once.

Take a String that returns the amount of duplicate characters in a string. It will be case sensitive and spaces are included. If there are no duplicates, return 0. Notes Make sure to only start counting the second time a character appears.

takes two strings, a and b. Return the number of times the two strings contain the same two letters at the same index. The two letters must appear at consecutive indices. For example, if a = "bboiizz" and b = "bbuiiz", your function should return 3, since the "bb", "ii", and "iz" appear at the same place in both strings.

takes a list of two numbers and determines if the sum of the digits in each number are equal to each other.

takes two arguments: a list lst and a number num. If an element occurs in lst more than num times, remove the extra occurrence(s) and return the result.

Take a Integer input and outputs an n x n square solely consisting of the integer n.

Take a list as input and returns the majority vote in a list. A majority vote is an element that occurs > N/2 times in a list (where N is the length of the list). Notes The frequency of the majority element must be strictly greater than 1/2. If there is no majority element, return None. If the list is empty, return None.

A list is given. Return a new list having the sum of all its elements except itself. For more clarity, check the examples below. Clarification [1, 2, 3, 4] = for first element => sum will be 2+3+4 = [9] [1, 2, 3, 4] = for second element => sum will be 1+3+4 = [9, 8] [1, 2, 3, 4] = for third element => sum will be 1+2+4 = [9, 8, 7] [1, 2, 3, 4] = for fourth element => sum will be 1+2+3 = [9, 8, 7, 6]

A number is said to be Harshad if it's exactly divisible by the sum of its digits. # 7 + 5 = 12 # 75 is not exactly divisible by 12 Take a input a function that determines whether a number is a Harshad or not.

Take a String and Write a code that changes every letter to the next letter: "a" becomes "b" "b" becomes "c" "d" becomes "e" and so on ... Note :=> Notes There will be no z's in the tests.

Take an input string, reverse the string word by word. Note:=> A word is defined as a sequence of non-space characters. The input string may contain leading or trailing spaces. However, your reversed string should not contain leading or trailing spaces. Try to solve this in linear time.

input a String takes a string s and returns a list of two-paired characters. If the string has an odd number of characters, add an asterisk * in the final pair. See the below examples for a better understanding: Notes Return [] if the given string is empty.

Please Input a String and capitalises the first letter of every word and lowercases all of the other letters in the word. Notes You won't run into any issues when dealing with numbers in strings. Please don't use the title() method directly :(

input a String and Transcribe the given DNA strand into corresponding mRNA - a type of RNA, that will be formed from it after transcription. DNA has the bases A, T, G and C, while RNA converts to U, A, C and G respectively. Notes Transcription is the process of making complementary strand. A, T, G and C in DNA converts to U, A, C and G respectively, when in mRNA.

Get Two WOrds as Input and that returns the number of characters shared between two words.

takes a string and censors words over four characters with * Notes:=> Don't censor words with exactly four characters. If all words have four characters or less, return the original string. The amount of * is the same as the length of the word.

Write a code to take 3 input start,end and digit. counts the number of times a specific digit occurs in a range (inclusive).

Please Take Input String Concatenating First and Last Character of a String

The URL is :=> https://realpython.github.io/fake-jobs/

BeautiFulSoup Discussion

The URL is :=> https://realpython.github.io/fake-jobs/

BeautiFulSoup Discussion

The URL is :=> https://realpython.github.io/fake-jobs/

BeautiFulSoup Discussion

The URL is :=> https://realpython.github.io/fake-jobs/

BeautiFulSoup Discussion

The URL is :=> https://realpython.github.io/fake-jobs/

BeautiFulSoup Discussion

For Given html_content Please find navigate through the HTML tree using BeautifulSoup? Note :=> Please convert String To BeautifulSoup and Then Parse

BeautiFulSoup Discussion

For Given html_content Please Find extract attributes from HTML tags using BeautifulSoup? Note :=> Please convert String To BeautifulSoup and Then Parse

BeautiFulSoup Discussion

For Given html_content Please find all instances of a specific HTML tag using BeautifulSoup? Note :=> Please convert String To BeautifulSoup and Then Parse

BeautiFulSoup Discussion

For Given html_content Please find all the hyperlinks (anchor tags) on the webpage? Note :=> Please convert String To BeautifulSoup and Then Parse

BeautiFulSoup Discussion

For Given html_content Pleaseparse HTML using BeautifulSoup? Note :=> Please convert String To BeautifulSoup and Then Parse

BeautiFulSoup Discussion

NOTE :=> Please read the data using pandas File Path :=> /root/data/airports.csv # 5. Calculate the average altitude of airports in each country

Pandas Second Assignment Discussion

NOTE :=> Please read the data using pandas File Path :=> /root/data/airports.csv 4. Find the number of airports in each country

Pandas Second Assignment Discussion

NOTE :=> Please read the data using pandas File Path :=> /root/data/airports.csv 3. Find the AirportID with the highest altitude

Pandas Second Assignment Discussion

NOTE :=> Please read the data using pandas File Path :=> /root/data/airports.csv 2. Find the airports located in Greenland

Pandas Second Assignment Discussion

NOTE :=> Please read the data using pandas File Path :=> /root/data/airports.csv # 1. Find the number of airports located in Papua New Guinea

Pandas Second Assignment Discussion

NOTE :=> Please read the data using pandas File Path :=> /root/data/AB_NYC_2019_Data.csv How many Entire home/apt are available?

pandas First Assignment Discussion

NOTE :=> Please read the data using pandas File Path :=> /root/data/AB_NYC_2019_Data.csv How many private rooms are available?

pandas First Assignment Discussion

NOTE :=> Please read the data using pandas File Path :=> /root/data/AB_NYC_2019_Data.csv How many rooms are available for 365 days?

pandas First Assignment Discussion

NOTE :=> Please read the data using pandas File Path :=> /root/data/AB_NYC_2019_Data.csv Print the first five lowest rated hosts

pandas First Assignment Discussion

NOTE :=> Please read the data using pandas File Path :=> /root/data/AB_NYC_2019_Data.csv Print the first five highest rated hosts

pandas First Assignment Discussion

NOTE :=> Please read the data using pandas File Path :=> /root/data/AB_NYC_2019_Data.csv Which host has the minimum rating?

pandas First Assignment Discussion

NOTE :=> Please read the data using pandas File Path :=> /root/data/AB_NYC_2019_Data.csv 2. Which host has the highest rating?

pandas First Assignment Discussion

NOTE :=> Please read the data using pandas File Path :=> /root/data/AB_NYC_2019_Data.csv # 1. Which host has hosted more number of rooms?

pandas First Assignment Discussion

NOTE :=> please import pyspark and Create SparkSession and SParkContex Then Solve The challenge File Path :=> file:///root/data/country_wise_latest_covid.csv # 6.) Print the top Region which has most recovered cases

pyspark DataFrame Second Assigment Discussion

NOTE :=> please import pyspark and Create SparkSession and SParkContex Then Solve The challenge File Path :=> file:///root/data/country_wise_latest_covid.csv 5.) In Africa Region, which country has more recovered cases

pyspark DataFrame Second Assigment Discussion

NOTE :=> please import pyspark and Create SparkSession and SParkContex Then Solve The challenge File Path :=> file:///root/data/country_wise_latest_covid.csv 4.) In Americas Region, which country has max death

pyspark DataFrame Second Assigment Discussion

NOTE :=> please import pyspark and Create SparkSession and SParkContex Then Solve The challenge File Path :=> file:///root/data/country_wise_latest_covid.csv 3.) In Europe Region, which country has max death.

pyspark DataFrame Second Assigment Discussion

NOTE :=> please import pyspark and Create SparkSession and SParkContex Then Solve The challenge File Path :=> file:///root/data/country_wise_latest_covid.csv 2.) 2.) Print minimum 10 confirmed cases countries. Please Print Only Country/Region and Confirmed Columns

pyspark DataFrame Second Assigment Discussion

NOTE :=> please import pyspark and Create SparkSession and SParkContex Then Solve The challenge File Path :=> file:///root/data/country_wise_latest_covid.csv 1.) Print top 10 countries with max confirmed cases , Please Print Country/Region and Confirmed

pyspark DataFrame Second Assigment Discussion

NOTE :=> please import pyspark and Create SparkSession and SParkContex Then Solve The challenge File Path :=> file:///root/data/airports.csv 5.) Calculate the average altitude of airports in each country.

pyspark DataFrame First Assigment Discussion

NOTE :=> please import pyspark and Create SparkSession and SParkContex Then Solve The challenge File Path :=> file:///root/data/airports.csv 4.) Find the number of airports in each country.

pyspark DataFrame First Assigment Discussion

NOTE :=> please import pyspark and Create SparkSession and SParkContex Then Solve The challenge File Path :=> file:///root/data/airports.csv 3.) Find the AirportID with the highest altitude.

pyspark DataFrame First Assigment Discussion

NOTE :=> please import pyspark and Create SparkSession and SParkContex Then Solve The challenge File Path :=> file:///root/data/airports.csv 2.) Find the airports located in Greenland.

pyspark DataFrame First Assigment Discussion

NOTE :=> please import pyspark and Create SparkSession and SParkContex Then Solve The challenge File Path :=> file:///root/data/airports.csv 1.) Find the number of airports located in Papua New Guinea.

pyspark DataFrame First Assigment Discussion

For The Given Below Link Of Data Please Create a RDD and Explore it and Solve The Below Question Link :=> file:///root/data/AB_NYC_2019_.csv c.) Number of Entire home/apt available ?

Pyspark RDD Third Assignment Discussion

For The Given Below Link Of Data Please Create a RDD and Explore it and Solve The Below Question Link :=> file:///root/data/AB_NYC_2019_.csv c.) Find Number of rooms available for 365 days ?

Pyspark RDD Third Assignment Discussion

For The Given Below Link Of Data Please Create a RDD and Explore it and Solve The Below Question Link :=> file:///root/data/AB_NYC_2019_.csv c.) Find First five lowest rated hosts ?

Pyspark RDD Third Assignment Discussion

For The Given Below Link Of Data Please Create a RDD and Explore it and Solve The Below Question Link :=> file:///root/data/AB_NYC_2019_.csv c.) Find First five highest rated hosts ?

Pyspark RDD Third Assignment Discussion

For The Given Below Link Of Data Please Create a RDD and Explore it and Solve The Below Question Link :=> file:///root/data/AB_NYC_2019_.csv c.) Find Host with minimum rating ?

Pyspark RDD Third Assignment Discussion

For The Given Below Link Of Data Please Create a RDD and Explore it and Solve The Below Question Link :=> file:///root/data/AB_NYC_2019_.csv a.) Fine The Host with highest rating ?

Pyspark RDD Third Assignment Discussion

For The Given Below Link Of Data Please Create a RDD and Explore it and Solve The Below Question Link :=> file:///root/data/AB_NYC_2019_.csv a.) Host with most number of rooms

Pyspark RDD Third Assignment Discussion

Please name the Yougnest athletic Country name

Pyspark RDD Second Assignment Discussion

# Who was the oldest athletic in the olympics? whcih country was he/she from?

Pyspark RDD Second Assignment Discussion

which Country Has won More number of Gold medals

Pyspark RDD Second Assignment Discussion

# Find the number of medals that the US won yearly.

Pyspark RDD Second Assignment Discussion

# Find the total number of medals won by each country in Skeleton

Pyspark RDD Second Assignment Discussion

Find the total number of medals won by each country in swimming.

Pyspark RDD Second Assignment Discussion

# Write PySpark code to count the total number of medals in each Olympic Sport/game.

Pyspark RDD Second Assignment Discussion

For The Below File Given Link WIth Path Please Explore The FIle Using RDD NOTE :=> please import pyspark and Create SparkSession and SParkContex Then Solve The challenge File Path :=> file:///root/data/olympix_data_organized_without_header - Copy.csv # Dataset Description This data set consists of the following fields: ***Athlete [0]***: Name of the athlete ***Age [1]***: Age of the athlete 8i9o-p ***Country [2]***: The name of the country participating in Olympics ***Year [3]***: The year in which Olympics is conducted ***Closing Date [4]***: Closing date of Olympics ***Sport [5]***: Sports name ***Gold Medals [6]***: No. of gold medals ***Silver Medals [7]***: No. of silver medals ***Bronze Medals [8]***: No. of bronze medals ***Total Medals [9]***: Total no. of medals """ Question1 :=> How many unique professions do we have in the data file?

Pyspark RDD Second Assignment Discussion

How many users are male and female ?

Pyspark First Assignment Discussion

How many users belong to a unique zip code in the sample file ?

Pyspark First Assignment Discussion

How many different users belongs to unique professions ?

Pyspark First Assignment Discussion

For The Below File Given Link WIth Path Please Explore The FIle Using RDD NOTE :=> please import pyspark and Create SparkSession and SParkContex Then Solve The challenge File Path :=> file:///root/data/user_data.txt Example :=> import pyspark #Initializing PySpark from pyspark import SparkContext, SparkConf from pyspark.sql import SparkSession # #Spark Config conf = SparkConf().setAppName("sample_app") sc = SparkContext(conf=conf) spark = SparkSession.builder.appName('SparkByExamples.com').getOrCreate() data1 = sc.textFile("file:///root/data/user_data.txt") Question1 :=> How many unique professions do we have in the data file?

Pyspark First Assignment Discussion

Read The Data Using Below Link :=> /root/olympix_data_organized_without_header.csv and GroupBy Year and count The Record

Pyspark Discussion

On below Link , Read Column Of the data only with 5 records namely name and age path :=> /root/olympix_data_organized_without_header.csv

Data1 Hard

Data1

numpy1

numpy11 Discussion

For The Given URL , Please Create The Dicitinoary Where It will have a UserId count as Dicitinoary as UserId as Count.

For The Given URL , For each Title create Total number Of characters as dicitnoary

Find The Unique Title From The Given URL From The Below Given URL Please Extract Unique and Give The COunt Of Unique Title

From The Below Given URL Please Extract All The USerIDs and Create The List

Please Enter a URL to check Whther it is Accessable or not If Accessable Please print Their Status_code

Question: Write a Python function to fetch data from a REST API endpoint and return the response. For Below URL :=> https://jsonplaceholder.typicode.com/posts/1

Index out of range error handling:

Exception Handling Discussion

File not found error handling:

Exception Handling Discussion

Value error handling:

Exception Handling Discussion

Division by zero error handling

Exception Handling Discussion

Write a Python program that takes two sets as input from the user and returns the set of elements that are present in the first set but not in the second set. and Then Convert Them into List and Sort in Ascending Order

Write a Python program that takes a set as input from the user and returns the set after removing all duplicate elements. Then Convert Them as List and Sort In Ascending Order

Write a Python program that takes two sets as input from the user and returns the intersection of the two sets.

Write a Python program that takes a set as input from the user and returns the number of elements in the set.

Write a Python program that takes two sets as input from the user and returns the union of the two sets. and Then Convert them as a list and Sort in Ascending Order.

How to fetch all results from an SQL query?

pymysql Discussion

How to create a cursor object to execute SQL queries?

pymysql Discussion

How to connect to a MySQL database using PyMySQL

pymysql Discussion

Add a getter method called "get_name" that returns the value of the "name" attribute, and a mutator method called "set_breed" that takes a parameter "breed" and sets it as the value of the "breed" attribute. Use the "get_name" method to get the value of the "name" attribute, and call the "set_breed" method with the argument "Retriever" to update the "breed" attribute of the "animal" object. Finally, print the updated "breed" attribute of the "animal" object. Note: Give the input in the code itself Expected output: Hello, I am a Dog, and I am a Labrador Name: Dog Updated Breed: Retriever

By using task 2 implement a "str" method that returns a string representation of the animal object with a greeting message. Then create an instance of the "Animal" class named "animal" with the arguments "Dog" and "Labrador", and print the "animal" object to display the greeting message. Note: Give the input in the code itself Expected output: Hello I am a Dog, and I am a Labrador

Define a class called "Animal" with an "init" method that takes two parameters, "name" and "breed", and sets them as attributes of the animal object. The "init" method should also print a message with the name and breed of the animal. Then create an instance of the "Animal" class named "animal" with the arguments "Dog" and "Labrador". Note: Give the input in the code itself Expected output: Hello I am a Dog and I am a Labrador

Define a class called "Animal" and implement a method called "set_identity" that sets the name of the Animal. Then create an instance of the "Animal" class, call the "set_identity" method with the argument "Dog", and print the value of the "name" attribute of the animal object. Note:Give the input in the code itself Expected output:Dog

Here is an age array. WAP to identify elements which are less than or equal to 18 years Age = np.array([75, 65, 25, 92, 18, 14, 22])

WAP to create an array and slice second column Note: Give the input in the code itself Sample input: [[1,2,3],[4,5,6],[7,8,9]] Expected output: [[2] [5] [8]]

WAP to create two vectors and calculate their dot product. Note: Give the input in the code itself Sample input: [1, 2, 3] [4, 5, 6] Expected output: Dot product: 32

WAP to create two arrays a and b also divide them. Note: Give the input in the code itself Sample input: a = np.array([2,3,4]) b = np.array([5,6,3]) Expected output: [0.4 0.5 1.33333333]

Create a 1D NumPy array with 11 equally spaced values between 0 and 1, inclusive

Create a 1D NumPy array with 11 equally spaced values between 0 and 1, inclusive

Create a 1D NumPy array containing all even float numbers between 10 and 74 (inclusive). Please check data type also (dtype).

Create a multidimensional array (3 rows, 4 columns) of ones

print Easy

sdjvfdfh

Create and print multidimensional array with multiple values (at least 2 x 2). Also print the dimension, size and shape of the array. Note: Give the input in the code itself

Create a program that takes a list of dictionaries, where each dictionary contains the name and age of a person. Use lambda functions to filter out all the dictionaries for which the age is less than 30. Then, use a lambda function to print the names of the persons in the sorted list, with the name capitalized and prefixed with "Mr." or "Ms." depending on their gender.

Given a list of dictionaries containing information about students (name, age, grade), use lambda and reduce functions to find the average grade of all students.

Create a function that takes a list of dictionaries, where each dictionary represents a student with "name" and "marks" keys, and returns a new list of dictionaries with an additional key "status". The "status" should be "pass" if the "marks" is greater than or equal to 60, otherwise "fail". Use function, lambda function and map to accomplish this task. students = [ {"name": "John", "marks": 80}, {"name": "Jane", "marks": 45}, {"name": "Bob", "marks": 70}, {"name": "Alice", "marks": 35}]

Write a lambda function to find all strings from a given list whose length is greater than 5.

Write a python program to find only males from a given list.

Filter Medium

Write a Python program to filter the given list of ages and create a new list that contains only those ages that are greater than 60 or less than 30. The given list of ages is age = [25, 65, 82, 41, 33]. Also mention how many elements are in the final list.

Write a python program that uses the map() function to convert a tuple of weights in pounds (173, 152, 119, 250) to a tuple of weights in kilograms. The conversion formula for pounds to kilograms is kilograms = pounds/2.2. The output should be rounded to 2 decimal places.

Write a lambda function in python to calculate the area of a rectangle give its length and width. Note: Give the input in the code itself Input inside the function: area_rectangle(5, 3)

Write a function in Python called plus_age that takes an input age and returns the age plus 10. Note: Students have to convert this into lambda function and give input in the code itself

Please check if anything else than A, G, C, T is present in a DNA sequence using search function. ATGCGCCTACAATCGGTACGTCATCGCGC@@@@@TTACGGCTCGGCTCTCNNNCGGGCCTGCGCGCGCCTGATCGA

Check if apple word is present in a string: I like apples. Do you like apples too?

In the given sentence try to find if Second is present or not. 'Tuesday is second day of the week'

Match the pattern in given string.

Write a Python function to find the second smallest number in a list of integers.

Functions Discussion

Write a Python function to calculate the area of a triangle given its base and height. Hint: Area of triangle: 0.5 * base * height

Functions Discussion

Write a Python recursive function to calculate the factorial of a non-negative integer.

Factorial Discussion

Write a Python function that counts the occurrences of a specific character in a string.

Functions Discussion

Write a Python function that takes a string and returns the reverse of the string.

Functions Discussion

WAP to print first 10 odd numbers using while loop

WAP to print the multiplication table of 1-5 as below format

WAP to print the multiplication table of 1-5 as below format

WAP to aggregate the below 2 lists, and create a restaurant menu items=['Juice','Salad','Sandwich','Paratha','Idli Sambar','Dosa','Misal Pav'] price=[100,150,80,180,90,120,50]

WAP to print the letters of the string and their index position

WAP to print the sum of all numbers from 10 to 99

WAP to calculate the factorial of a number entered by user, using for loop

WAP to prompt user to enter their name, print all letters of the name.

WAP to write all the even numbers between 1 and 20

WAP to print all the single digit numbers from 0 to 9

WAP to prompt user to enter 2 numbers, Print the greater number among those 2

If and else Condition Discussion

WAP to prompt user to enter their name, age and amount to be paid by them. Print the receipt as below when age<55: Enter your name: Sharan Enter your age: 54 Enter the total amount :1000 Hi Sharan, Please pay an amount of 1000.0 Print the receipt as below when age>=55: Enter your name: Shilpa Enter your age: 56 Enter the total amount :1000 You are eligible for senior citizen discount Hi Shilpa, Please pay an amount of 900.0

If and else Condition Discussion

calculate the BMI using formula: bmi=(weight in kg)/(square of height in metre)

Variable Discussion

WAP to collect the below details about a user, using the input prompt. Name: String Age: Int Gender: String Occupation: String Weight(Kgs): Float Height(Inches): Float

Variable Discussion

WAP to prompt user to enter 2 numbers(divident and divisor), print the Quotient.

Variable Discussion

Write a Python program that asks the user to enter two tuples and then concatenates them(Take input as String)

Write a Python program that asks the user to enter a list of numbers and calculates the sum of all elements in the list (Take input as String)

Write a function named count_vowels that takes a string as input and returns the count of vowels (a, e, i, o, u) in the string.

Functions Discussion

Define a function called check_palindrome that takes a string as input and returns True if the string is a palindrome; otherwise, returns False.

Functions Discussion

User Please provide 7 Coding Dicitnoary Question with ipu and output ChatGPT Certainly! Here are seven coding dictionary questions along with their inputs (ipu) and expected outputs: Question: Define a function named reverse_string that takes a string as input and returns the reverse of that string. Input (ipu): "hello" Expected Output: "olleh" Question: Create a function called calculate_average that takes a list of numbers as input and returns the average of those numbers. Input (ipu): [10, 20, 30, 40, 50] Expected Output: 30.0 Question: Write a function named count_vowels that takes a string as input and returns the count of vowels (a, e, i, o, u) in the string. Input (ipu): "programming" Expected Output: 3 Question: Define a function called check_palindrome that takes a string as input and returns True if the string is a palindrome; otherwise, returns False. Input (ipu): "radar" Expected Output: True Question: Implement a function named find_max that takes a list of numbers as input and returns the maximum number in the list.

Functions Discussion

Create a function called capitalize_words that takes a string as input and returns the string with each word capitalized.

Functions Discussion

Define a function called check_prime that takes an integer as input and returns True if the number is prime; otherwise, returns False.

Functions Discussion

Write a function named calculate_factorial that takes an integer as input and returns its factorial.

Functions Discussion

Create a function called merge_lists that takes two lists as input and returns a new list containing all elements from both lists.

Functions Discussion

Implement a function called count_words that takes a string as input and returns a dictionary where keys are words and values are the frequency of each word in the string.

Functions Discussion

Write a function named reverse_list that takes a list as input and returns a new list with the elements reversed.

Functions Discussion

Create a function called find_even_numbers that takes a list of integers as input and returns a new list containing only the even numbers.

Functions Discussion

Define a function named double_numbers that takes a list of numbers as input and returns a new list where each number is doubled.

Functions Discussion

function to add two value

Invert a dictionary (swap keys and values)

dictionary Discussion

Find common key-value pairs between two dictionaries.

dictionary Discussion

Remove key-value pairs from a dictionary if the value is equal to a given value.

dictionary Discussion

Problem: Check if two dictionaries have the same key-value pairs.

dictionary Discussion

Sort a dictionary by its values.

dictionary Discussion

Problem: Merge two dictionaries.

dictionary Discussion

Given a list, count the occurrences of each element and return a dictionary where the keys are the elements and the values are the counts.

dictionary Discussion

Write a Python program to find the percentage of uppercase letters, lowercase letters, digits and special characters in a given string?

How do you convert string to integer?

Write a Python program to find duplicate characters in a string?

Write a Python program to remove all white spaces from a string?

Write a Python program to reverse a string?

Write a Python program to count the total number of occurrences of a given character in a string ?

Write a Python program to count the number of words in a string?

Write a Python program to remove duplicate words in a String ?

Write a Python program to compute element-wise sum of given tuples.

Write a Python program to convert a given tuple of positive integers into an integer. Original tuple:

Write a Python program calculate the product, multiplying all the numbers of a given tuple. Original Tuple:

Write a Python program to replace last value of tuples in a list to 100

Write a Python program to reverse a tuple ?

Write a Python program to find common items from two lists

write a program to take a number and a digit from the user. and then findout that digit is coming how many times to that given number. a.) int num1 = 122233 int digit = 2 Output :=> 3 b.) int num1 = 122345 int digit = 7 Outout :=> 0

write a program to take two integer value from user. and then tell which number is having the highest digit average. a.) int num1 = 12345; :=> 3.0 int num2 = 27 :=> 4.5 num2 is having highest digit average. b.) int num1 = 12345; :=> 3.0 int num2 = 27003 :=> 2.4 num1 is having highest digit average.

write a program to check whether given number is corzon number? Input: N = 5 Output: Yes Explanation: 2^5 + 1 = 33 and 2*5 + 1 = 11 Since 11 divides 33, so 5 is a curzon number. Input: N = 10 Output: No Explanation: 2^10 + 1 = 1025 and 2*10 + 1 = 21 1025 is not divisible by 21, so 10 is not a curzon number.

write a program to check whether the number is palindrom or not ?

Write a Python program to get the frequency of the elements in a list.

Write a Python program to find the list of words that are longer than n from a given list of words.

Write a Python program to remove duplicates from a list.

Write a Python Code to count total number of negative elements in an List.

Write a Python Code to count total number of even and odd elements in an List.

Write a Python Code to find second largest element in an List.

Write a Python Code to find maximum Value From a List

Write a Python Code to find sum of all List elements.

Write a Python Code to print all negative elements in an List.

Write a Python program to print the Fibonacci series up to a given number using a while loop.

Write a python program to create an empty list and add 5 integers to the list by taking an input from the user using while loop and print the final list

Write a Python program to count the number of vowels in a given string using a while loop.

Write a Python program to reverse a given number using a while loop.

Write a Python program to find the sum of all even numbers from 1 to 100 using a while loop.

Write a Python program to count and print the number of vowels in a given string using a for loop.

Write a Python program to print all prime numbers from 1 to 100 using a for loop. Use the break statement to optimize the code.

Write a Python program to print a pattern of asterisks using nested for loops.

Write a Python program to find the factorial of a number using a for loop.

Write a Python program to calculate the sum of all even numbers from 1 to 50 using a for loop.

Write a Python program that takes two numbers as input and checks if the first number is divisible by the second number. If it is, print "Divisible," otherwise, print "Not divisible.

If and else Condition Discussion

Write a Python program to determine the grade of a student based on their marks. The grading system is as follows: 90 or above: 'A' 80-89: 'B' 70-79: 'C' 50-69: 'D' Below 50: 'F' Additionally, check if the student has passed or failed (marks greater than or equal to 50 are considered passing). Your program should take the student's marks as input and display both the grade and whether they passed or failed. provide python code for this.

If and else Condition Discussion

Write a Python Program to find the maximum of 3 numbers. Take the input from user

If and else Condition Discussion

Write a Python program to categorize an employee's performance based on their monthly sales. Print "Excellent" for sales over 10,000,"Good"for sales between 5,000 and 10,000,"Average"for sales between 2,000 and 5,000,and "Poor" for sales below 2,000.

If and else Condition Discussion

Write a Python program that takes a temperature in Celsius as input and converts it to Fahrenheit. If the temperature is above 100°F, print "Very hot," if it's between 80°F and 100°F, print "Hot," and if it's below 80°F, print "Moderate.

If and else Condition Discussion

WAP to increment a number by 1 using the unary + operator.

Variable Discussion

WAP that calculates the area of a rectangle. Prompt the user to enter the length and width, and then use arithmetic operators to compute the area. Note: Take inputs of length and width as float type.

Variable Discussion

WAP to collect the below details about a user, using the input prompt.

Variable Discussion

WAP to prompt user to enter 2 numbers(dividend and divisor), print the Quotient.

Variable Discussion

WAP to prompt input from user to enter their name and print "Hello {username}, Congratulations on your first python program!!

Variable Discussion

Find the Odd Integer Create a function that takes a list and finds the integer which appears an odd number of times. Examples find_odd([1, 1, 2, -2, 5, 2, 4, 4, -1, -2, 5]) ➞ -1 find_odd([20, 1, 1, 2, 2, 3, 3, 5, 5, 4, 20, 4, 5]) ➞ 5 find_odd([10]) ➞ 10 Notes There will always only be one integer that appears an odd number of times.

How Many Vowels? Create a function that takes a string and returns the number (count) of vowels contained within it. Examples count_vowels("Celebration") ➞ 5 count_vowels("Palm") ➞ 1 count_vowels("Prediction") ➞ 4 Notes a, e, i, o, u are considered vowels (not y). All test cases are one word and only contain letters.

Instant JAZZ Create a function which concatenates the number 7 to the end of every chord in a list. Ignore all chords which already end with 7. Examples jazzify(["G", "F", "C"]) ➞ ["G7", "F7", "C7"] jazzify(["Dm", "G", "E", "A"]) ➞ ["Dm7", "G7", "E7", "A7"] jazzify(["F7", "E7", "A7", "Ab7", "Gm7", "C7"]) ➞ ["F7", "E7", "A7", "Ab7", "Gm7", "C7"] jazzify([]) ➞ []

print average of numbers from 1 to 10

print the numbers which is not divisible by 3 , from 1 to 20.

print the sum and product from 1 to 10.

get the Common Between Two Arrays

Common Arrays Discussion

Get input from user and Sort in ASC format

Get a First Ele

Constraints: 0 <= arr[i] <= 1000 ; 0<=i<=9 Input: First line of input contains n, the number of elements in the input array Take n elements into an array and print the odd numbers and even numbers Take n elements into an array and print the odd numbers and even numbers

get First and Last value as list

List Output Discussion

Get First Value

Please show the maxmium value in list

Convert Minutes into Seconds Write a function that takes an integer minutes and converts it to seconds.

Mathimatics Discussion

Write a program to print the following to the console

Take a number as inout and print whether or not it's a prime. Note: Print yes if it's a prime and print no if not a prime.

primenumber Discussion

Take a number (N) as input and print the first N fibonacci numbers separated by , (comma and a space)

fibonacci Discussion

Take a number as input and calculate the square of that number

Write a program to scan the name of the user and say hello to them.

Take a character as an input and print whether it is an vowel or a consonant. Sample input and output are shown as below:

vowel consonant medium Discussion

Read two numbers as input and print the sum of the two given numbers. Sample input and output are shown as below

integers Discussion

Write a program to print the following to the console