File tree Expand file tree Collapse file tree 9 files changed +9
-11
lines changed Expand file tree Collapse file tree 9 files changed +9
-11
lines changed Original file line number Diff line number Diff line change 1- # Redo triangle challenge 35, adding the feature of showing what type of triangle will be formed:
1+ #42- Redo triangle challenge 35, adding the feature of showing what type of triangle will be formed:
22# – EQUILATERAL: all sides equal
33# – ISOSCELES: two sides equal, one different
44# – SCALENE: all sides different
Original file line number Diff line number Diff line change 1- #Develop a logic that reads a person's weight and height, calculates their Body Mass Index (BMI) and
1+ #43- Develop a logic that reads a person's weight and height, calculates their Body Mass Index (BMI) and
22# shows their status, according to the table below:
33# – BMI below 18.5: Underweight
44#– Between 18.5 and 25: Ideal Weight
Original file line number Diff line number Diff line change 1- # Develop a program that calculates the amount to be paid for a product, considering its normal price and
1+ #44- Develop a program that calculates the amount to be paid for a product, considering its normal price and
22# payment conditions: – cash/check: 10% discount
33#– cash on card: 5% discount
44#– up to 2x on card: formal price
Original file line number Diff line number Diff line change 1-
2- #Create a program that makes the computer play Jokenpô with you.
1+ #45-Create a program that makes the computer play Jokenpô with you.
32from random import randint
43print ("Let's play rock, paper, scissors:" )
54items = ('Rock' , 'Paper' , 'Scissors' )
Original file line number Diff line number Diff line change 1-
2- #Make a program that displays a countdown on the screen for fireworks to go off, going from 10 to 0,
1+ #46- Make a program that displays a countdown on the screen for fireworks to go off, going from 10 to 0,
32# with a 1 second pause between them.
43from time import sleep
54for c in range (10 , - 1 , - 1 ):
Original file line number Diff line number Diff line change 1- # Create a program that displays on the screen all even numbers that are in the range between 1 and 50.
1+ #47- Create a program that displays on the screen all even numbers that are in the range between 1 and 50.
22for c in range (2 , 51 ,2 ):
33 print (c , end = ' ' )
44print ("Finished!" )
Original file line number Diff line number Diff line change 1- # Make a program that calculates the sum of all numbers that are multiples of three and that are in the
1+ #48- Make a program that calculates the sum of all numbers that are multiples of three and that are in the
22# range from 1 to 500.
33soma = 0
44counter = 0
Original file line number Diff line number Diff line change 1- # Redo CHALLENGE 9, showing the multiplication table of a number that the user chooses, but now using a for loop.
1+ #49- Redo CHALLENGE 9, showing the multiplication table of a number that the user chooses, but now using a for loop.
22number = int (input ('Enter a number to showing the multiplication:' ))
33for c in range (1 ,11 ):
44 print (f'{ number } x { c :2} = { number * c } .' )
Original file line number Diff line number Diff line change 1- #Develop a program that reads six integers and displays the sum of only those that are even. If the value
1+ #50- Develop a program that reads six integers and displays the sum of only those that are even. If the value
22# entered is odd, disregard it.
33sum_numbers = 0
44counter = 0
You can’t perform that action at this time.
0 commit comments