Skip to content

Commit 74b2355

Browse files
links part 1 updated and pert 4.1 finished
1 parent 3296d7d commit 74b2355

File tree

3 files changed

+100
-51
lines changed

3 files changed

+100
-51
lines changed

README.md

+20-20
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
# Python Programming MOOC 2023
22
## Introduction to Programming
33
### [Part 1](https://github.com/antoniolopez7217/Python_Programming_MOOC/tree/main/part1)
4-
1. Getting started
5-
2. Information from the user
6-
3. More about variables
7-
4. Arithmetic operations
8-
5. Conditional statements
4+
1. [Getting started](https://github.com/antoniolopez7217/Python_Programming_MOOC/tree/main/part1/1.%20Getting%20started)
5+
2. [Information from the user](https://github.com/antoniolopez7217/Python_Programming_MOOC/tree/main/part1/2.%20Information%20from%20the%20user)
6+
3. [More about variables](https://github.com/antoniolopez7217/Python_Programming_MOOC/tree/main/part1/3.%20More%20about%20variables)
7+
4. [Arithmetic operations](https://github.com/antoniolopez7217/Python_Programming_MOOC/tree/main/part1/4.%20Arithmetic%20operations)
8+
5. [Conditional statements](https://github.com/antoniolopez7217/Python_Programming_MOOC/tree/main/part1/5.%20Conditional%20statements)
99

1010
### [Part 2](https://github.com/antoniolopez7217/Python_Programming_MOOC/tree/main/part2)
11-
1. Programming terminology
12-
2. More conditionals
13-
3. Combining conditions
14-
4. Simple loops
11+
1. [Programming terminology]()
12+
2. [More conditionals]()
13+
3. [Combining conditions]()
14+
4. [Simple loops]()
1515

1616
### [Part 3](https://github.com/antoniolopez7217/Python_Programming_MOOC/tree/main/part3)
17-
1. Loops with conditions
18-
2. Working with strings
19-
3. More loops
20-
4. Defining functions
17+
1. [Loops with conditions]()
18+
2. [Working with strings]()
19+
3. [More loops]()
20+
4. [Defining functions]()
2121

22-
### [Part 4]()
23-
1. The Visual Studio Code editor, Python interpreter and built-in debugging tool
24-
2. More functions
25-
3. Lists
26-
4. Definite iteration
27-
5. Print statement formatting
28-
6. More strings and lists
22+
### [Part 4](https://github.com/antoniolopez7217/Python_Programming_MOOC/tree/main/part4)
23+
1. [The Visual Studio Code editor, Python interpreter and built-in debugging tool]()
24+
2. [More functions]()
25+
3. [Lists]()
26+
4. [Definite iteration]()
27+
5. [Print statement formatting]()
28+
6. [More strings and lists]()

part1/README.md

+31-31
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
11
# Part 1
22
## Programming exercises
33
### Getting started
4-
1. [Emoticon](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/emoticon.py)
5-
2. [Fix the code: Seven Brothers](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/seven_brothers.py)
6-
3. [Row, Row, Row Your Boat](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/row_your_boat.py)
7-
4. [Minutes in a year](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/minutes_year.py)
8-
5. [Print some code](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/print_code.py)
4+
1. [Emoticon](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/1.%20Getting%20started/emoticon.py)
5+
2. [Fix the code: Seven Brothers](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/1.%20Getting%20started/seven_brothers.py)
6+
3. [Row, Row, Row Your Boat](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/1.%20Getting%20started/row_your_boat.py)
7+
4. [Minutes in a year](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/1.%20Getting%20started/minutes_year.py)
8+
5. [Print some code](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/1.%20Getting%20started/print_code.py)
99
### Information from the user
10-
1. [Name twice](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/name_twice.py)
11-
2. [Name and exclamation marks](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/name_exclamations.py)
12-
3. [Name and address](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/name_address.py)
13-
4. [Fix the code: Utterances](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/utterances.py)
14-
5. [Story](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/story.py)
10+
1. [Name twice](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/2.%20Information%20from%20the%20user/name_twice.py)
11+
2. [Name and exclamation marks](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/2.%20Information%20from%20the%20user/name_exclamations.py)
12+
3. [Name and address](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/2.%20Information%20from%20the%20user/name_address.py)
13+
4. [Fix the code: Utterances](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/2.%20Information%20from%20the%20user/utterances.py)
14+
5. [Story](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/2.%20Information%20from%20the%20user/story.py)
1515
### More about variables
16-
1. [Extra space](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/extra_space.py)
17-
2. [Arithmetics](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/arithmetics.py)
18-
3. [Fix the code: Print a single line](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/single_line.py)
16+
1. [Extra space](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/3.%20More%20about%20variables/extra_space.py)
17+
2. [Arithmetics](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/3.%20More%20about%20variables/arithmetics.py)
18+
3. [Fix the code: Print a single line](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/3.%20More%20about%20variables/single_line.py)
1919
### Arithmetic operations
20-
1. [Times five](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/times_five.py)
21-
2. [Name and age](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/name_age.py)
22-
3. [Seconds in a day](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/seconds_day.py)
23-
4. [Fix the code: Product](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/product.py)
24-
5. [Sum and product](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/sum_product.py)
25-
6. [Sum and mean](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/sum_mean.py)
26-
7. [Food expenditure](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/food_expenditure.py)
27-
8. [Students in groups](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/student_group.py)
20+
1. [Times five](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/4.%20Arithmetic%20operations/times_five.py)
21+
2. [Name and age](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/4.%20Arithmetic%20operations/name_age.py)
22+
3. [Seconds in a day](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/4.%20Arithmetic%20operations/seconds_day.py)
23+
4. [Fix the code: Product](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/4.%20Arithmetic%20operations/product.py)
24+
5. [Sum and product](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/4.%20Arithmetic%20operations/sum_product.py)
25+
6. [Sum and mean](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/4.%20Arithmetic%20operations/sum_mean.py)
26+
7. [Food expenditure](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/4.%20Arithmetic%20operations/food_expenditure.py)
27+
8. [Students in groups](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/4.%20Arithmetic%20operations/student_group.py)
2828
### Conditional statements
29-
1. [Orwell](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/orwell.py)
30-
2. [Absolute value](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/absolute_value.py)
31-
3. [Soup or no soup](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/soup.py)
32-
4. [Order of magnitude](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/order_magnitude.py)
33-
5. [Calculator](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/calculator.py)
34-
6. [Temperatures](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/temperatures.py)
35-
7. [Daily wages](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/daily_wages.py)
36-
8. [Loyalty bonus](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/loyalty_bonus.py)
37-
9. [What to wear tomorrow](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/wear_tomorrow.py)
38-
10. [Solving a quadratic equation](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/quadratic_eq.py)
29+
1. [Orwell](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/5.%20Conditional%20statements/orwell.py)
30+
2. [Absolute value](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/5.%20Conditional%20statements/absolute_value.py)
31+
3. [Soup or no soup](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/5.%20Conditional%20statements/soup.py)
32+
4. [Order of magnitude](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/5.%20Conditional%20statements/order_magnitude.py)
33+
5. [Calculator](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/5.%20Conditional%20statements/calculator.py)
34+
6. [Temperatures](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/5.%20Conditional%20statements/temperatures.py)
35+
7. [Daily wages](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/5.%20Conditional%20statements/daily_wages.py)
36+
8. [Loyalty bonus](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/5.%20Conditional%20statements/loyalty_bonus.py)
37+
9. [What to wear tomorrow](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/5.%20Conditional%20statements/wear_tomorrow.py)
38+
10. [Solving a quadratic equation](https://github.com/antoniolopez7217/Python_Programming_MOOC/blob/main/part1/5.%20Conditional%20statements/quadratic_eq.py)
3939

4040
*All subjects are included as comments within the file of each exercise.*
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Please write a program which asks the user which editor they are using.
2+
# The program should keep on asking until the user types in Visual Studio Code.
3+
4+
# Have a look at the example of expected behaviour below:
5+
6+
7+
# Editor: Emacs
8+
# not good
9+
# Editor: Vim
10+
# not good
11+
# Editor: Word
12+
# awful
13+
# Editor: Atom
14+
# not good
15+
# Editor: Visual Studio Code
16+
# an excellent choice!
17+
18+
# If the user types in Word or Notepad, the program counters with awful.
19+
# Other unacceptable editor choices receive the reply not good.
20+
21+
# The program should be case-insensitive in its reactions.
22+
# That is, the same user input in lowercase, uppercase or mixed case should trigger the same reaction:
23+
24+
25+
# Editor: NOTEPAD
26+
# awful
27+
# Editor: viSUal STudiO cODe
28+
# an excellent choice!
29+
30+
# Hint: The simplest way to achieve this is converting all characters to the same case.
31+
# The Python string method lower converts a string to lowercase entirely. An example of its use:
32+
33+
# mystring = "Visual Studio CODE"
34+
# if "visual studio code" == mystring.lower():
35+
# print("this was the string I was looking for!")
36+
# NB: this exercise doesn't ask you to write any functions, so you should not place any code within an
37+
# if __name__ == "__main__" block. The same applies to any upcoming exercises that don't explicitly ask for functions.
38+
39+
while True:
40+
editor = input("Editor: ").lower()
41+
if editor == "visual studio code":
42+
print("an excellent choice!")
43+
break
44+
if editor == "word" or editor == "notepad":
45+
print("awful")
46+
else:
47+
print("not good")
48+
49+

0 commit comments

Comments
 (0)