Week 2 Exercises
Week 2 Exercises
Provide the file including successfully executable codes for the following tasks:
4. Create a list of numbers and print the sum of all the elements.
6. Generate a random number between 1 and 100 and ask the user to guess it.
10. Create a simple calculator that can perform addition, subtraction, multiplication, and
division.
11. Write a function to find the square root of a number using Newton's method.
13. Write a program to find all the prime numbers between 1 and 100.
19. Create a dictionary of names and ages, and print the name of the oldest person.
20. Write a program to find the least common multiple (LCM) of two numbers.
Good Luck!!!