File tree Expand file tree Collapse file tree 7 files changed +7
-7
lines changed Expand file tree Collapse file tree 7 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 1- # Create a program that reads any real number from the keyboard and displays its entire portion on the screen.
1+ #16- Create a program that reads any real number from the keyboard and displays its entire portion on the screen.
22import math
33number = float (input ('Enter a value:' ))
44print ('The value typed was {} and its entire part is {}.' .format (number , math .trunc (number )))
Original file line number Diff line number Diff line change 1- # Write a program that reads the length of the opposite and adjacent sides of a right triangle. Calculate and
1+ #17- Write a program that reads the length of the opposite and adjacent sides of a right triangle. Calculate and
22# show the length of the hypotenuse.
33import math
44opposite_side = float (input ('Enter the value of opposite side of triangle:' ))
Original file line number Diff line number Diff line change 1- # Write a program that reads any angle and displays on the screen the value of the sine, cosine and tangent of that angle.
1+ #18- Write a program that reads any angle and displays on the screen the value of the sine, cosine and tangent of that angle.
22import math
33angle = float (input ('Enter a value of an angle:' ))
44sine = math .sin (math .radians (angle ))
Original file line number Diff line number Diff line change 1- # A teacher wants to draw one of his four students to erase the board. Make a program that helps him, reading the
1+ #19- A teacher wants to draw one of his four students to erase the board. Make a program that helps him, reading the
22# name of the students and writing the name of the chosen one on the screen.
33import random
44name_one = str (input ('First students name:' ))
Original file line number Diff line number Diff line change 1- # The same teacher from challenge 19 wants to draw the order in which the students' work will be presented. Make a program that
1+ #20- The same teacher from challenge 19 wants to draw the order in which the students' work will be presented. Make a program that
22# read the names of the four students and show the order drawn.
33import random
44first_name = str (input ('First students name:' .strip ()))
Original file line number Diff line number Diff line change 1- # Write a Python program that opens and plays audio from an MP3 file.
1+ #21- Write a Python program that opens and plays audio from an MP3 file.
22import pygame
33pygame .init ()
44pygame .mixer .init ()
Original file line number Diff line number Diff line change 1- # Write a program that reads a number from 0 to 9999 and displays each of the separate digits on the screen.
1+ #23- Write a program that reads a number from 0 to 9999 and displays each of the separate digits on the screen.
22number = int (input ('Informe um número:' ))
33unit = number // 1 % 10
44ten = number // 10 % 10
You can’t perform that action at this time.
0 commit comments