Skip to content

my-courses.net

Python Courses & Exercises

Facebook Twitter Google Plus Linkedin Instagram YouTube Pinterest Tumblr VK Email RSS
  • Home
  • Python Courses
  • Python Exercises
  • Computer Glossary
  • Register

Solution Exercise 66: Python program that extract the list of all urls within a given string

April 17, 2023Younes DerfoufiPython-Exercises1 Comment

Exercise 66 Write a Python algorithm as a function which takes as input a string 's' and extract the list of all urls from the string 's'. Example: if s = "You can use google https://www.google.com or facebook https://www.facebook.com", the function returns the list: ['https://www.google.com', 'https://www.facebook.com'].

Solution Exercise 65: python algorithm that test if the first character is equal to the last

April 17, 2023April 17, 2023Younes DerfoufiPython-Exercises1 Comment

Exercise 65 Write a Python algorithm which takes a string 's' as input and returns True if the first character is the same as the last character of the string 's', and False otherwise. Example: if s = "render", the function must returns True. If s = "Python" the function returns False.

Solution Exercise 64: python function which compute the number of uppercase character within a given string s

April 16, 2023Younes DerfoufiPython-Exercises1 Comment

Exercise 64 Write a Python program as function which takes a string 's' as parameter and return the number of Uppercase characters within the string 's'. Example: if s = "Python Programming", the function must returns 2.

Solution Exercise 63: Python function which compute the sum of digits of a given string

April 15, 2023April 15, 2023Younes DerfoufiPython-Exercises1 Comment

Exercise 63 Write a Python program as function called sum_of_digits() that take a string 's' as parameter and return the sum of digits in the string 's'. Solution def sum_of_digits(string): """ This function takes a string as input and returns the sum of all the digits in the string. """ # we initialize a variable…

Solution Exercise 62: python program which extract all digit within a given string

April 13, 2023April 13, 2023Younes DerfoufiPython-Exercises1 Comment

Exercise 62 Write a Python algorithm which determines the list of digits within a given string 's'. Example: if s = "Python3.8 is more powerful than Python2.7 " the program must returns the list : ['3', '8', '2', '7']

Solution Exercise 61: Python program which remove the duplicate characters from given string

April 13, 2023Younes DerfoufiPython-Exercises1 Comment

Exercise 61 Write a Python algorithm as function which takes a string 's' as input and return an other string obtained by removing the duplicate characters of 's'. Example: if s = "Programming", the function must retun "Progamin"

Solution Exercise 42: python algorithm which create a list from entered numbers

April 9, 2023Younes DerfoufiPython-Exercises1 Comment

Exercise 42 Create a Python program that prompts the user to input numbers separated by semicolons ';'. The program should then convert the input into a list of integers.

Posts navigation

Previous Page 1 Page 2 Page 3 … Page 362 Next

Search

Recent Posts

  • Solution Exercise 73: python algorithm that remove all vowels from a given string
  • Solution Exercise 72 : python algorithm to examin if a substring is present within a given string
  • Solution Exercise 71: python program to find the minimum digits within a given string
  • Solution Exercise 70: Python program that extracts all words from a given string s whose length is less than to 4
  • Solution Exercise 69: Python function that checks if a given string s is a duplicated string

Facebook Group

UserOnline

1 User Online

Log In

fourteen + 20 =

  • Register
  • Lost your password?
© 2023 my-courses.net | Wordpress_Theme: Blogghiamo by CrestaProject.          CopyrightFrance.com