Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
italojsoliveira committed Oct 28, 2023
1 parent c5806fd commit a5aef1b
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 2 deletions.
17 changes: 16 additions & 1 deletion set_1/ex2.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
# A program that reads the user input and outputs information about it
# Write a program that reads the user input and outputs the following pieces of information about it:

# - Does it have only space?

# - Is it a number?

# - Is it alphabetic?

# - Is it alphanumeric?

# - Is it in uppercase?

# - Is it in lowercase?

# - Is it capitalized?


user_input = input('Enter something: ')

Expand Down
3 changes: 3 additions & 0 deletions set_1/ex3.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@

# Write a program that reads the user input number and outputs a message saying its antecedent and successor.

user_input = int(input('Enter a number: '))

antecedent = user_input - 1
Expand Down
4 changes: 4 additions & 0 deletions set_1/ex4.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@

# Write a program that reads the user input number and outputs a message saying its double,
# triple, and square root with at most two decimal digits.


user_input = int(input('Enter a number: '))

print( 'The double of {} is {}.'.format(user_input, 2 * user_input) )
Expand Down
2 changes: 1 addition & 1 deletion set_1/ex5.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# average of two student grades
# Write a program that receives two student grades and outputs the average grade.

grade_1 = float(input('Enter the first grade: '))

Expand Down
2 changes: 2 additions & 0 deletions set_1/ex6.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Write a program that receives a distance value in meters and outputs a message saying its corresponding values in km, hm, dam, dm, cm, and mm.

meter_distance = float(input('Enter the distance in meters: '))

km_distance = meter_distance / 1000
Expand Down
60 changes: 60 additions & 0 deletions set_1/list_of_exercises.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#### Exercise 1

Write a program that reads the user name as an input and outputs a welcome message.

#### Exercise 2

Write a program that reads the user input and outputs the following pieces of information about it:

- Does it have only space?

- Is it a number?

- Is it alphabetic?

- Is it alphanumeric?

- Is it in uppercase?

- Is it in lowercase?

- Is it capitalized?

#### Exercise 3

Write a program that reads the user input number and outputs a message saying its antecedent and successor.

#### Exercise 4

Write a program that reads the user input number and outputs a message saying its double, triple, and square root with at most two decimal digits.

#### Exercise 5

Write a program that receives two student grades and outputs the average grade.

#### Exercise 6

Write a program that receives a distance value in meters and outputs a message saying its corresponding values in km, hm, dam, dm, cm, and mm.

#### Exercise 7

Write a program that receives a number and gives its multiplication table like this:

------------
3 x 1 = 3
3 x 2 = 6
3 x 3 = 9
3 x 4 = 12
3 x 5 = 15
3 x 6 = 18
3 x 7 = 21
3 x 8 = 24
3 x 9 = 27
3 x 10 = 30
------------

#### Exercise 8

#### Exercise 9


0 comments on commit a5aef1b

Please sign in to comment.