Skip to content

Commit 7d04c5e

Browse files
author
Tom Cheung
committed
add 3.1 part files
0 parents  commit 7d04c5e

File tree

4 files changed

+58
-0
lines changed

4 files changed

+58
-0
lines changed

1.Shopping/1.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#include <iostream>
2+
using namespace std;
3+
4+
int main()
5+
{
6+
cout << 7.9 * 0.8 + 9.5 * 1.5 + 8.7 * 0.6 << endl;
7+
return 0;
8+
}

1.Shopping/1.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
console.log(7.9 * 0.8 + 9.5 * 1.5 + 8.7 * 0.6)

1.Shopping/1.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
print(7.9 * 0.8 + 9.5 * 1.5 + 8.7 * 0.6)

README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Programming
2+
The project is created to learning *Javascript* and *Python3*, but beginning with C++ on [Tsinghua X_2015_T2](http://www.xuetangx.com/courses/course-v1:TsinghuaX+30240233X_2015_T2+sp/info), I wrote down the notes reference from [MichaelLiao](https://www.liaoxuefeng.com/) and some demos during learning to review later!  
3+
4+
*Text editor*:1. [Dev-C++](https://sourceforge.net/projects/orwelldevcpp/) 2. [Visual Studio Code](https://code.visualstudio.com/) 3. [Notepad ++](https://notepad-plus-plus.org/download/v7.5.3.html)
5+
## Ⅰ. Knowledge Point      
6+
### 1. *C++*
7+
### 2. *Javascript*
8+
### 3. *Python3*  
9+
#### Tips:
10+
##### 1. Make sure that *Tab = 4 Backspace*.
11+
##### 2. Python program is *sensitive* to case.
12+
## Ⅱ. Demos
13+
### 1/33. Shopping
14+
Description:
15+
16+
| *price* >>> *amount*
17+
*Tomatos* | ¥7.9 yuan/kg >>> 0.8kg
18+
*Eggs* | ¥9.5 yuan/kg >>> 1.5kg
19+
*Cucumbers* | ¥8.7 yuan/kg >>> 0.6kg
20+
21+
Question: How much the total vegetables?
22+
23+
#### *C++* edition
24+
25+
```
26+
#include <iostream>
27+
using namespace std;
28+
29+
int main()
30+
{
31+
cout << 7.9 * 0.8 + 9.5 * 1.5 + 8.7 * 0.6 << endl;
32+
return 0;
33+
}
34+
```
35+
36+
#### *Python3* edition
37+
38+
```
39+
print(7.9 * 0.8 + 9.5 * 1.5 + 8.7 * 0.6)
40+
```
41+
42+
#### *Javascript* edition
43+
44+
```
45+
console.log(7.9 * 0.8 + 9.5 * 1.5 + 8.7 * 0.6)
46+
```
47+
48+
### 2/33.

0 commit comments

Comments
 (0)