Skip to content

Commit 6750a97

Browse files
committed
Refactor: to Portuguese for English.
1 parent 0825512 commit 6750a97

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

ex026.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Write a program that reads a sentence from the keyboard and shows how many times the letter "a" appears and in what position it is
1+
#26- Write a program that reads a sentence from the keyboard and shows how many times the letter "a" appears and in what position it is
22
# appears the first time and in what position it appears last time.
33
sentence = input('Enter a sentence:').upper()
44
print(f'The letter A shows {sentence.count('A')} times.')

ex028.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Write a program that makes the computer "think" of an integer between 0 and 5 and ask the user to try
1+
#28- Write a program that makes the computer "think" of an integer between 0 and 5 and ask the user to try
22
# find out which number was chosen by the computer. The program should write on the screen whether the user won or
33
# it lost.
44
from random import randint

ex029.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Write a program that reads the speed of a car. If it exceeded 80km/h, show a message saying that it
1+
#29- Write a program that reads the speed of a car. If it exceeded 80km/h, show a message saying that it
22
# was fined. The fine will cost R$7.00 for each km above the limit.
33
speed = float(input('Enter the speed of your car:'))
44
if speed > 80:

ex030.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Create a program that reads an integer and tells you whether it is even or odd.
1+
#30- Create a program that reads an integer and tells you whether it is even or odd.
22
number = int(input('Enter a number:'))
33
result = number % 2
44
if result ==0:

ex032.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Make a program that reads any year and shows whether it is a leap year.
1+
#32- Make a program that reads any year and shows whether it is a leap year.
22
year = int(input('Which year do you want to analize?'))
33
if year % 4 == 0 and year % 100 !=0 or year % 400 ==0:
44
print(f"The year {year} it's a leap year")

0 commit comments

Comments
 (0)