diff --git a/set_1/ex2.py b/set_1/ex2.py index c538869..c819bf1 100644 --- a/set_1/ex2.py +++ b/set_1/ex2.py @@ -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: ') diff --git a/set_1/ex3.py b/set_1/ex3.py index 5897970..771f408 100644 --- a/set_1/ex3.py +++ b/set_1/ex3.py @@ -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 diff --git a/set_1/ex4.py b/set_1/ex4.py index 6239739..40f9300 100644 --- a/set_1/ex4.py +++ b/set_1/ex4.py @@ -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) ) diff --git a/set_1/ex5.py b/set_1/ex5.py index ec30541..da62b72 100644 --- a/set_1/ex5.py +++ b/set_1/ex5.py @@ -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: ')) diff --git a/set_1/ex6.py b/set_1/ex6.py index fbc35f5..26cbd6c 100644 --- a/set_1/ex6.py +++ b/set_1/ex6.py @@ -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 diff --git a/set_1/list_of_exercises.md b/set_1/list_of_exercises.md index e69de29..f377f8a 100644 --- a/set_1/list_of_exercises.md +++ b/set_1/list_of_exercises.md @@ -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 + +