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
# 5. Create the instance attributes fullname and email in the Employee class. Given a person's first and last names:
3
-
# - Form the fullname by simply joining the first and last name together, separated by a space.
4
-
# - Form the email by joining the first and last name together with a . in between, and follow it with @company.com at the end. Make sure everything is in lowercase.
1
+
# 5. Write a class which has two methods get_word and print_word.
2
+
# - get_word accepts a string from the user and print_word prints the string in upper case.
# 6. Write a class which has two methods get_word and print_word.
2
-
# - get_word accepts a string from the user and print_word prints the string in upper case.
1
+
# 6. Create a Sandwich class with the attributes order_number and ingredients (which is given as a list).
2
+
# - Only the ingredients will be given as input.
3
3
4
+
# You should also make it possible to choose a ready-made sandwich rather than typing out the ingredients manually. Also hard-code the following sandwich flavours.
Copy file name to clipboardExpand all lines: session_10/exercises/exercises_10.md
+2-6Lines changed: 2 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -27,14 +27,10 @@
27
27
- iii. Delete the wheels.
28
28
29
29
30
-
5. Create the instance attributes fullname and email in the Employee class. Given a person's first and last names:
31
-
- Form the fullname by simply joining the first and last name together, separated by a space.
32
-
- Form the email by joining the first and last name together with a . in between, and follow it with @company.com at the end. Make sure everything is in lowercase.
33
-
34
-
6. Write a class which has two methods get_word and print_word.
30
+
5. Write a class which has two methods get_word and print_word.
35
31
- get_word accepts a string from the user and print_word prints the string in upper case.
36
32
37
-
7. Create a Sandwich class with the attributes order_number and ingredients (which is given as a list).
33
+
6. Create a Sandwich class with the attributes order_number and ingredients (which is given as a list).
38
34
- Only the ingredients will be given as input.
39
35
40
36
You should also make it possible to choose a ready-made sandwich rather than typing out the ingredients manually. Also hard-code the following sandwich flavours.
0 commit comments