You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: exercises.md
+27-25Lines changed: 27 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,17 @@ Create a program that:
18
18
19
19
Warning! Do not use the programming language MAGIC. After you complete the exercise feel free to do so.
20
20
21
+
# ex.9
22
+
The exercise is almost identical to a previous exercise with a minor change. It's the end of the semester and you got your marks from, Geometry, Algebra, Physics classes. If the average score is 7 and above print "Good job!", if the average score is between 6 and 4 print "You need to work harder!", if the average score is below 4 print "Failed, you really need to work harder!".
23
+
24
+
Create a program that:
25
+
* Reads the values of these 3 lessons
26
+
* Calculate the average of your grades
27
+
* Example: Geometry = 6, Algebra = 7, Physics = 8
28
+
* Output: Your average score is 7, Good job!"
29
+
30
+
Warning! Do not use the programming language magic. After you complete the exercise feel free to do so.
31
+
21
32
# ex.3
22
33
You've bought a Bitcoin and now it's on the rise!!!
23
34
@@ -54,22 +65,24 @@ Create a program that:
54
65
(Warning! Τhe prices are made up for exercise purposes)
55
66
56
67
# ex.6
57
-
You are interested in buying a new laptop. You check the price and you see that the price is 300$ without 10% tax.
68
+
You are interested in buying a new laptop. You check the price and you see that the price is 300$ without the 10% tax.
58
69
59
70
Create a program that:
60
-
* Read the price of the laptop
61
-
* Read the tax percentage
62
-
* Prints the total amount
71
+
1) Reads the price of the laptop
72
+
2) Reads the tax percentage
73
+
3) Prints the total amount
74
+
63
75
* Output: "The total price of the laptop is 330$"
64
76
65
77
# ex.7
66
-
In a company the monthly salary of an employee is calculated byminimum wage 400$ per month, plus 20$ multiply by the employment years, plus 30$ for each employee kid.
78
+
In a company the monthly salary of an employee is calculated by: the minimum wage 400$ per month, plus 20$ multiplied by the number of years employed, plus 30$ for each child they have.
67
79
68
80
Create a program that:
69
-
* Read the employment years
70
-
* Read the number of each employee kids
71
-
* Prints the total amount the employee must take
72
-
* Output: "The total amount is 560$, 400$ minimum wage + 100$ for 5 years experience + 60$ for 2 kids"
81
+
1) Reads the number of years employed
82
+
2) Reads the number of children the employee has
83
+
3) Prints the total amount of salary the employee makes
84
+
85
+
* Output: "The total amount is 560$. 400$ minimum wage + 100$ for 5 years experience + 60$ for 2 kids"
73
86
74
87
# ex.8
75
88
The exercise is almost identical to a previous exercise with a minor change. In a company the monthly salary of an employee is calculated by minimum wage 400$ per month, plus 20$ multiply by the employment years, plus 30$ for each employee kid, plus 100$ if the employee didn't miss 1 day of work.
@@ -80,32 +93,21 @@ Create a program that:
80
93
* Prints the total amount the employee must take
81
94
* Output: "The total amount is 660$, 400$ minimum wage + 100$ for 5 years experience + 60$ for 2 kids + 100$ for not missing a day at work"
82
95
83
-
# ex.9
84
-
The exercise is almost identical to a previous exercise with a minor change. It's the end of the semester and you got your marks from, Geometry, Algebra, Physics classes. If the average score is 7 and above print "Good job!", if the average score is between 6 and 4 print "You need to work harder!", if the average score is below 4 print "Failed, you really need to work harder!".
85
-
86
-
Create a program that:
87
-
* Reads the values of these 3 lessons
88
-
* Calculate the average of your grades
89
-
* Example: Geometry = 6, Algebra = 7, Physics = 8
90
-
* Output: Your average score is 7, Good job!"
91
-
92
-
Warning! Do not use the programming language magic. After you complete the exercise feel free to do so.
93
-
94
96
# ex.10
95
-
Create a program that prints the last digit of an integer
97
+
Create a program that prints the last digit of a given integer
96
98
97
99
Create a program that:
98
-
* Reads an integer
99
-
* Print the last digit
100
+
1) Reads the integer
101
+
2) Prints the last digit
100
102
101
-
Warning! Do not use the programming language magic. After you complete the exercise feel free to do so.
103
+
Warning! Do not use the programming language MAGIC. After you complete the exercise feel free to do so.
102
104
103
105
Warning! Don't try to convert the number into string etc.
104
106
105
107
Warning! For this problem it's ok after spending some time to look for the solution.
106
108
107
109
# ex.11
108
-
You have started working and you are wondering how many things you can buy with the money you've earned. A PS4 cots 200$, a Samsung 900$, a TV 500$, a game skin 9.99$
110
+
You have started working and you are wondering how many things you can buy with the money you've earned. A PS4 cots 200$, a Samsung phone 900$, a TV 500$, a game skin 9.99$
109
111
110
112
Create a program:
111
113
* Notice that you can't but half TV or 1/4 of PS4.
0 commit comments