Mar-16-2019, 09:39 PM
I am starting my journey in the world of programming (this after a class at the university), my knowledge of the subject is close to zero ... and this is taking me to get into tutorials to learn Python 3, I'm liking it, but i suck at this, so I request support from a charitable soul that can guide me with the following exercises, I am on the subject of functions using def, so we are asked to solve the exercises in that way. I'm a little desperate, because I feel that when I try to solve it I'm chopping stone with a piece of wood ... and yes it is my homework, but i losing my mind
:
Exercise 3. [25 marks] Write a program that asks the user for a numeric value and print the next output to the console function of said value, for this example the numerical value was 5:
12345
01234
00123
00012
00001
Exercise 4. [15/30 points] Write a program that asks the user for a numeric value and print the next output to the console depending on this value, for this example the numerical value was 5:
\2345
1\345
12\45
123\5
1234\
Exercise 5. [15/30 points] Write a program that receives a numerical value and prints the next hourglass figure in function of said numeric value, for this example the value was 9:
123456789
.1234567
..12345
...123
....1
...123
..12345
.1234567
123456789
Exercise 6. (50 points) Make a program that generates the following sequence of digits:
First, the user is asked for the number of rows to be calculated. The number of rows must be between 11 and 20 and the The result will appear in the console output as indicated in the figure. If the user enters a value less than 11 rows, adjust the value from rows to 11. If the user enters a value greater than 20, adjust the value of rows to 20.
..........1
.........232
........34543
.......4567654
......567898765
.....67890109876
....7890123210987
...890123454321098
..90123456765432109
.0123456789876543210
123456789010987654321
Exercise 7. [25 marks] Write a program that asks the user for a numeric value and prints the next output to the console function of said value, for this example the numerical value was 5:
##
#o#
#oo#
#ooo#
#oooo#
Exercise 8. [30 marks] Write a program that predicts the approximate size of a population of organisms. The application must request information from the initial number of organisms, the daily increase of the population (as a percentage) and the number of days that organisms will be allowed to multiply. For example, assume that the user enters the following values:
Initial number of organisms: 2
Initial Increase (in%): 30
Days of reproduction: 10
The program should print the following table:
Day Approximate Population
1 2
2 2.6
3 3.38
4 4,394
5 5.7122
6 7.42586
7 9.653619
8 12.5497
9 16.31462
10 21.209

Exercise 3. [25 marks] Write a program that asks the user for a numeric value and print the next output to the console function of said value, for this example the numerical value was 5:
12345
01234
00123
00012
00001
Exercise 4. [15/30 points] Write a program that asks the user for a numeric value and print the next output to the console depending on this value, for this example the numerical value was 5:
\2345
1\345
12\45
123\5
1234\
Exercise 5. [15/30 points] Write a program that receives a numerical value and prints the next hourglass figure in function of said numeric value, for this example the value was 9:
123456789
.1234567
..12345
...123
....1
...123
..12345
.1234567
123456789
Exercise 6. (50 points) Make a program that generates the following sequence of digits:
First, the user is asked for the number of rows to be calculated. The number of rows must be between 11 and 20 and the The result will appear in the console output as indicated in the figure. If the user enters a value less than 11 rows, adjust the value from rows to 11. If the user enters a value greater than 20, adjust the value of rows to 20.
..........1
.........232
........34543
.......4567654
......567898765
.....67890109876
....7890123210987
...890123454321098
..90123456765432109
.0123456789876543210
123456789010987654321
Exercise 7. [25 marks] Write a program that asks the user for a numeric value and prints the next output to the console function of said value, for this example the numerical value was 5:
##
#o#
#oo#
#ooo#
#oooo#
Exercise 8. [30 marks] Write a program that predicts the approximate size of a population of organisms. The application must request information from the initial number of organisms, the daily increase of the population (as a percentage) and the number of days that organisms will be allowed to multiply. For example, assume that the user enters the following values:
Initial number of organisms: 2
Initial Increase (in%): 30
Days of reproduction: 10
The program should print the following table:
Day Approximate Population
1 2
2 2.6
3 3.38
4 4,394
5 5.7122
6 7.42586
7 9.653619
8 12.5497
9 16.31462
10 21.209