Python Lista 1
Python Lista 1
Create variables to store an integer, a float, a string, and a boolean. Print out the values and data
Write a program that performs basic arithmetic operations (addition, subtraction, multiplication, and
Create a program that asks the user for their name and then prints a greeting using their name.
Write a program that checks if a user-inputted number is even or odd and prints an appropriate
message.
Task 6: Loops
Task 7: Lists
Create a list of your favorite fruits. Print each fruit from the list using a loop.
Task 8: Functions
Write a function that calculates the area of a rectangle. The function should take the length and
width as parameters and return the area.
Ask the user for their favorite quote, then print it in uppercase and lowercase.
Create a list of numbers. Write a program that finds and prints the largest number in the list.
Create a dictionary that maps the names of fruits to their colors. Allow the user to enter a fruit name
Write a program that reads a text file and counts the number of words in it.
Additional Tasks for the Ambitious
Create a program that asks the user to enter a number. Handle any exceptions that may occur if the
Build a basic calculator that can perform addition, subtraction, multiplication, and division. Ask the
user for two numbers and an operation, then calculate and display the result.
Generate a random number between 1 and 10 and ask the user to guess it. Provide feedback on