Skip to content

Commit c6e3a80

Browse files
committed
.
1 parent 3037548 commit c6e3a80

File tree

7 files changed

+37
-0
lines changed

7 files changed

+37
-0
lines changed

ex066.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Create a program that reads integers from the keyboard. The program will only stop when the user enters the value 999,
2+
# which is the stopping condition. At the end, show how many numbers were entered and what the sum of them was
3+
# (disregarding the flag).
4+
amount = 0
5+
while True:
6+
number = int(input('Ender a number (enter 999 to stop):'))
7+
if number == 999:
8+
break
9+
amount += number
10+
print(f"The sum of the numbers is {amount}")

ex067.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Write a program that displays the multiplication table of several numbers, one at a time, for each value entered by
2+
# the user. The program will stop when the requested number is negative.
3+
while True:
4+
number = int(input("What number do you want to see the multiplication of?"))
5+
if number < 0:
6+
break
7+
for counter in range (1,11):
8+
print(f'{number} X {counter} = {number * counter}')

ex068.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Make a program that plays odd or even with the computer. The game will only stop when the player loses, showing the
2+
# total number of consecutive wins he has achieved at the end of the game.

ex069.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#Create a program that reads the age and gender of several people. For each registered person, the program should
2+
# ask whether or not the user wants to continue. At the end, show:
3+
#A) how many people are over 18 years old.
4+
#B) how many men were registered.
5+
#C) how many women are under 20 years old.

ex070.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Create a program that reads the name and price of several products. The program should ask the user whether to
2+
# continue or not. At the end, show:
3+
# A) what is the total amount spent on the purchase.
4+
# B) how many products cost more than R$1000.
5+
# C) what is the name of the cheapest product.

ex071.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#Create a program that simulates the operation of an ATM. At the beginning, ask the user how much money will be
2+
# withdrawn (integer) and the program will inform how many bills of each value will be delivered. NOTE:
3+
#Consider that the ATM has bills of U$50, U$20, U$10 and U$1.

teste04.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
contagem = 0
2+
while contagem <= 10:
3+
print(contagem)
4+
index+= 2

0 commit comments

Comments
 (0)