Close

2022-08-03

Python Questions for Beginners

Python Questions for Beginners
  • Write a program that asks the user for their name and age and then prints out a message that tells them how many years until they turn 100.
  • Create a program that generates a random password for the user. The password should have at least 8 characters and contain at least one uppercase letter, one lowercase letter, and one number.
  • Write a program that allows the user to enter a list of strings and then prints out the list with all duplicates removed.
  • Create a program that takes in a list of integers and returns the average of the numbers in the list.
  • Write a program that asks the user for a string and then prints out the string with all vowels removed.
  • Create a program that reads a list of strings and returns the string with the most extended length.
  • Write a program that takes in a list of integers and returns the sum of the even numbers.
  • Create a program that reads a list of strings and prints out the list in reverse order.
  • Write a program that asks the user for a sentence and then prints out the sentence with all punctuation removed.
  • Create a program that takes in a list of integers and returns the maximum value in the list.
  • Write a program that asks the user for a number and then prints out all prime numbers up to that number.
  • Create a program that reads in a list of strings and returns the list sorted alphabetically.
  • Write a program that takes in a list of integers and returns the product of all the numbers in the list.
  • Create a program that reads in a list of strings and returns the string with the most vowels.
  • Write a program that asks the user for a number and then prints out the Fibonacci sequence up to that number.
  • Create a program that takes in a list of integers and returns the sum of the numbers in the list that are multiples of 3.
  • Write a program that asks the user for a number and then prints out the factorial of that number.
  • Create a program that takes in a list of integers and returns the average of the numbers in the even list.
  • Write a program that asks the user for a sentence and then prints out the sentence with all the words reversed.
  • Create a program that reads in a list of strings and returns the list with all duplicates removed.
  • Write a program that asks the user for a number and then prints out the sum of all the multiples of 3 or 5 up to that number.
  • Create a program that takes in a list of integers and returns the sum of the odd numbers.
  • Write a program that asks the user for a sentence and then prints out the sentence with all the words in alphabetical order.
  • Create a program that reads in a list of strings and returns the list with all the strings of odd length removed.
  • Write a program that asks the user for a sentence and then prints out the sentence with the first letter of each word capitalized.