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
+28-28Lines changed: 28 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -112,7 +112,7 @@ Create a program:
112
112
* Output: "I can buy 4 PS4, 1 Samsung, 3 TV, 80 game skin"
113
113
114
114
# ex.12
115
-
You've consumed X amount of Mbps on Wikipedia and Y amount of Mbps on memes. The cost of visiting Wikipedia is 0,10$ per Mb
115
+
You've consumed X amount of Mbps on Wikipedia and Y amount of Mbps on memes. The cost of visiting Wikipedia is 0,10$ per Mb
116
116
and the cost for watching memes is 0,05$ per Mb. If total consumption is more than 100$ print "Too much consumption".
117
117
If watching meme consumption is greater than reading wikipedia consumption print "WOW MANY MEMES", "SUCH LOL"(in new line).
118
118
@@ -191,7 +191,7 @@ Create a program that:
191
191
Create a program that reads a number that you want to get the sum until that number
192
192
193
193
Create a program that:
194
-
* Reads the number you want to sum
194
+
* Reads the number you want to sum
195
195
* Calculates the sum of 1+2+3+4...+98+99+n
196
196
* Prints the sum of 1+2+3+4...+98+99+n
197
197
* Input example: 100
@@ -203,7 +203,7 @@ Create a program that:
203
203
Create a program that reads a number that you want to get the sum until that number and then calculate the averge of these numbers
204
204
205
205
Create a program that:
206
-
* Reads the number you want to sum
206
+
* Reads the number you want to sum
207
207
* Calculates the sum of 1+2+3+4...+98+99+n
208
208
* Calculates the average of the sum 1+2+3+4...+98+99+n
209
209
* Input example: 100
@@ -319,7 +319,7 @@ Create a program that:
319
319
* Output: "1 Driver payed. The total earnings are 7,5$"
320
320
321
321
# ex.30
322
-
A company asked you to create a program that reads an employee name and salary and store them into proper lists.The number of employees is unknown. To exit the program the user must input "quit". Before the exit find the employees with the maximum salary and print who they are.
322
+
A company asked you to create a program that reads an employee name and salary and store them into proper lists.The number of employees is unknown. To exit the program the user must input "quit". Before the exit find the employees with the maximum salary and print who they are.
323
323
324
324
Create a program that:
325
325
* Reads employee name and salary, store them into different lists
@@ -338,11 +338,11 @@ The previous exercise but store the names and salaries into one list.
338
338
339
339
#### Notice that if the programming language you are using doesn't support different kind of values in lists try to store the numbers as characters and convert to numbers when you want to compare
340
340
341
-
# ex.v2.1
341
+
# ex.32
342
342
you have a list with domain names and an other list with domain extension. also possible combinations.
343
343
344
-
# ex.32
345
-
A company asked you to create a program that reads an employee name and salary and store them into proper lists.The number of employees is unknown. To exit the program the user must input "quit". Before the exit find and print the total number of employees and the total amount company is paying in salaries.
344
+
# ex.33
345
+
A company asked you to create a program that reads an employee name and salary and store them into proper lists.The number of employees is unknown. To exit the program the user must input "quit". Before the exit find and print the total number of employees and the total amount company is paying in salaries.
346
346
347
347
Create a program that:
348
348
* Reads employee name and salary, store them into different lists
* Output: "4 employees and the total amount of salaries is 15161$"
353
353
354
-
# ex.33
354
+
# ex.34
355
355
A company asked you to create a program that reads an employee name and salary and store them into proper lists.The number of employees is unknown. To exit the program the user must input "quit". Before exit find the average salary and for each employee print if their salary is above or below average salary.
* Output: "The average salary is 3790.25$", "Mary's salary is below average","John's salary is below average","George's salary is above average","Nicole's salary is above average"
363
363
364
-
# ex.34
364
+
# ex.35
365
365
A company asked you to create a program that reads an employee name and salary and store them into proper lists.The number of employees is unknown. To exit the program the user must input "quit". Before exit find the average salary and for each employee print if their salary is above or below average salary. If the employee have above average salary then remove the employee from the list.
366
366
367
367
Create a program that:
@@ -372,7 +372,7 @@ Create a program that:
372
372
* Output: "The average salary is 3790.25$", "Mary's salary is below average","John's salary is below average","George's salary is above average","Nicole's salary is above average"
373
373
* Output: "Total Employees: 2"
374
374
375
-
# ex.35
375
+
# ex.36
376
376
A company asked you to create a program that reads an employee name and salary and store them into proper lists.The number of employees is unknown. To exit the program the user must input "quit". Before exit find the average salary and for each employee print if their salary is above or below average salary. If the employee have above average salary then remove the employee from the list and put the employee in to a new list. Print the total number of current employees and removed emloyees
377
377
378
378
Create a program that:
@@ -385,15 +385,15 @@ Create a program that:
385
385
* Output: "The average salary is 3790.25$", "Mary's salary is below average","John's salary is below average","George's salary is above average","Nicole's salary is above average"
You have these lists of empoyees and their salaries: names[Mary, John, George, Nicole, Nick, Jim, Jack, Johanna], salaries[32343, 12134, 25342, 35342, 42343, 32134, 15342, 25342]
390
390
391
391
Create a program that:
392
392
* Orders the salaries by biggest salary first
393
393
* Prints all employees in order by lowest salary first
394
394
* Output: "later when I run the script"
395
395
396
-
# ex.37
396
+
# ex.38
397
397
Create a program that stores all [Morse Code](https://en.wikipedia.org/wiki/Morse_code) into a dictionary. Then
398
398
asks the user for an input text and translate to Morse Code.
Create a program that asks if the user want to translate a text **from Morse Code** or **to Morse Code**
409
409
410
410
#### [Here you can find online Morse Code translator](https://morsecode.scphillips.com/translator.html)
411
411
412
-
# ex.39
412
+
# ex.40
413
413
Here is [Nato Phonetic Alphabet](https://en.wikipedia.org/wiki/NATO_phonetic_alphabet). Create a program that stores the all the abrevations into a dictionary. Next asks the user for a word and then print the right words for each letter of the given word
414
414
415
415
Create a program that:
@@ -421,10 +421,10 @@ Create a program that:
421
421
422
422
#### [Here you can find Nato Phonetic Alphabet](https://en.wikipedia.org/wiki/NATO_phonetic_alphabet)
423
423
424
-
# ex.40
424
+
# ex.41
425
425
Create a program that asks if the user want to translate a text **from Nato Phonetic Alphabet** or **to Nato Phonetic Alphabet**
426
426
427
-
# ex.41
427
+
# ex.42
428
428
A user account on a website is composed by a username, a password, if the user has profile picture, and the email.
429
429
430
430
Create a program:
@@ -435,7 +435,7 @@ Create a program:
435
435
436
436
#### Notice that the structure is like this users[username] = {'password': password, 'hasPhoto': hasPhoto, 'email': email}, word not in quotes are variables.
437
437
438
-
# ex.42
438
+
# ex.43
439
439
A user account on a website is composed by a username, a password, if the user has profile picture, and the email.
440
440
441
441
Create a program:
@@ -447,7 +447,7 @@ Create a program:
447
447
448
448
#### Notice that the structure is like this users[username] = {'password': password, 'hasPhoto': hasPhoto, 'email': email}, word not in quotes are variables.
449
449
450
-
# ex.43
450
+
# ex.44
451
451
A user account on a website is composed by a username, a password, if the user has profile picture, and the email.
452
452
453
453
Create a program:
@@ -459,7 +459,7 @@ Create a program:
459
459
460
460
#### Notice that the structure is like this users[username] = {'password': password, 'hasPhoto': hasPhoto, 'email': email}, word not in quotes are variables.
461
461
462
-
# ex.44
462
+
# ex.45
463
463
A user account on a company's website is composed by a username, a password, salary, and the email.
464
464
A company asks you to create a program that create a user, ask for username,password,salary, email and check if the username or email already exists.
465
465
@@ -469,30 +469,30 @@ Create a program:
469
469
* Print all the users
470
470
471
471
472
-
# ex.45
472
+
# ex.46
473
473
start creating users until user enter stop. check if username and email exist. check password. create user. ask user if he/she wants to delete a specific user by email or username then proceed and delete the user
474
474
475
475
476
-
# ex.46
476
+
# ex.47
477
477
bank has users. users info are name, id, balance. Create users and ask for id number and balance.
478
478
479
-
# ex.47
479
+
# ex.48
480
480
bank has users. users info are name, id, balance. Create, read info(id, balance), check if user already exists. if user has 0 balance, delete account.
481
481
482
-
# ex.48
482
+
# ex.49
483
483
bank has users. users info are name, id, balance. Create, read info(id, balance), check if user already exists. if user has 0 balance, copy to a new list , delete account from active list.
484
484
485
-
# ex.49
485
+
# ex.50
486
486
bank users, info balance everything provided. Ask program for options. create user(check if user exit) if update user id(check if exist) balance(check not to be negative), if result = 0(warning! might deactivate the account, are you sure you want to procceed?)---(if no, ask for new amount ot leave). name etc.
487
487
488
-
# ex.50
488
+
# ex.51
489
489
You have two lists. The first list has the names of 5 employees and the second list has their salary. Create a dictionary with the names as key and salaries as value.
490
490
491
-
# ex.51
491
+
# ex.52
492
492
You have three lists. The first list has the names of 5 employees, the second list has their salary and the third list has how many days each employee missed. Create a dictionary with the employee name as key, salary and days missed for each employee as value
493
493
494
-
# ex.52
494
+
# ex.53
495
495
From the previous exercise find the employee with the fewest days missing.
496
496
497
-
# ex.53
497
+
# ex.54
498
498
From the previous exercise find the employee with the fewest days missing and lowest salary and give the employee a raise of 10%
0 commit comments