/Python-exercises

Exercice list from Curso em Vídeo

Primary LanguagePython

python_exercises

Exercises from Curso Em Vídeo

World 1

  1. Create a program that says 'Hello World!' on the screen.
  2. Make a program that reads a person's name and displays a welcome message.
  3. Create a program that reads two numbers and shows the sum between them.
  4. Make a program that reads something from the keyboard and displays its primitive type and all possible information about it on the screen.
  5. Make a program that reads an Integer and displays its successor and predecessor on the screen.
  6. Create an algorithm that reads a number and shows its double, triple and square root.
  7. Develop a program that reads a student's two grades, calculates and displays their average.
  8. Write a program that reads a value in meters and displays it converted to centimeters and millimeters.
  9. Make a program that reads any Integer and displays your times tables on the screen.
  10. Create a program that reads how much money a person has in their wallet and shows how many dollars they can buy.
  11. Make a program that reads the width and height of a wall in meters, calculates its area and the amount of paint needed to paint it, knowing that each liter of paint paints an area of ​​2 square meters.
  12. Make an algorithm that reads the price of a product and shows its new price, with 5% off.
  13. Make an algorithm that reads an employee's salary and shows their new salary, with a 15% increase.
  14. Write a program that converts a temperature by typing in degrees Celsius and converts it to degrees Fahrenheit.
  15. Write a program that asks how many miles a rental car has traveled and how many days it has been rented...
  16. Create a program that reads any real number from the keyboard and displays its entire portion on the screen.
  17. Write a program that reads the length of the opposite side and the adjacent side of a right triangle. Calculate and show the length of the hypotenuse.
  18. Make a program that reads any angle and displays the sine, cosine and tangent value of that angle on the screen.
  19. A teacher wants to draw one of his four students to erase the board. Make a program that helps him by reading the names of the students and writing the name of the chosen one on the screen.
  20. The same teacher in challenge 19 wants to draw the order of presentation of students from students. Make a program that reads the names of the four students and shows the order
  21. Make a Python program that opens and plays audio from an MP3 file.
  22. Python Exercise 22: Create a program that reads a person's full name and displays: - The name in all upper and lower case letters. - How many letters in total (not including spaces). - How many letters has the first name.
  23. Write a program that reads a number from 0 to 9999 and displays each of the separate digits on the screen.
  24. Create a program that reads the name of a city and says whether or not it starts with the name “SANTO”.
  25. Create a program that reads a person's name and tells them if they have “silva” in their name.
  26. Create a program that reads a person's name and tells them if they have “SILVA” in their name.
  27. Make a program that reads a person's full name, then displays the first and last name separately.
  28. Write a program that makes the computer “think” of an integer between 0 and 5 and ask the user to try to find out which number was chosen by the computer. The program should write on the screen if the user won or lost.
  29. Write a program that reads the speed of a car. If he goes over 80km/h, show a message saying he was fined. The fine will cost R$7.00 for each km over the limit.
  30. Create a program that reads an integer and shows on the screen whether it is EVEN or ODD.
  31. Develop a program that asks the distance of a trip in Km. Calculate the ticket price, charging R$0.50 per Km for trips of up to 200Km and R$0.45 for longer trips.
  32. Make a program that reads any year and shows if it is a leap year.
  33. Make a program that reads three numbers and shows which is the largest and which is the smallest.
  34. Write a program that asks for an employee's salary and calculates the amount of his raise. For salaries above R$1250.00, calculate a 10% increase. For inferiors or equals, the increase is 15%.
  35. Develop a program that reads the length of three lines and tells the user whether or not they can form a triangle.

World 2

  1. Write a program to approve the bank loan for a home purchase. Ask the value of the house, the buyer's salary and in how many years he will pay. The monthly payment cannot exceed 30% of the salary or the loan will be denied.
  2. Write a Python program that reads any integer and ask the user to choose the base conversion: 1 to binary, 2 to octal, and 3 to hexadecimal.
  3. Write a program that reads two whole numbers and compares them. showing on the screen a message:
  4. Make a program that reads a young person's year of birth and tells them, based on their age, whether they are still enlisting, whether it is an exact time to enlist, or whether enlistment time is past. Your program should also show you the time that is missing or past the deadline.
  5. Create a program that reads two grades from a student and calculates their average, showing a message at the end, according to the average achieved: < 5 == disaproved, 5 - 6.9 == recovery, >= 7 == approved.
  6. The National Swimming Confederation needs a program that reads an athlete's year of birth and shows their category, according to age: