I learned Python with a beautiful girl at Paiza # 01
You can do her with Python and the rumored Paiza-san Learn Python with a beautiful girl It seems that the service has started. So I gave it a try. By the way, I know Python at least, but I'm trying to find teaching materials that can be used for in-house missions of Python. There seems to be an introductory 1/2, so I'm trying introductory 1 first.
Introductory edition (about 60 minutes)
chapter1: What is Python? (About 3 minutes)
-
Target audience
-
Python beginner
-
Minimum email and typing
-
Light knowledge of HTML / CSS (hopefully)
-
Described in Python 3
-
Python overview
-
Can be used for web services and machine learning
-
One of the three major languages of Google
-
Scripting language
-
I try to write it easily
-
Rich library
chapter2: Let's write a program in Python (3:21)
-
Write a program in Python
-
Explanation of how to use PAIZA learning
-
You can code and check the result while watching the video.
-
(Not explained) Ace editor base
-
Display HELLO WORLD on the screen
-
From the print description
-
The screen is a little different from the video, but it doesn't bother me
-
Introduction of points that are easy to make a mistake
-
When using full-width characters incorrectly
Exercises
- You will be able to score exercises by logging in.
- 5 titles
- A rudimentary problem of programming rather than Python
chapter3: 03: Make the program easier to see with comments! (3:47)
- Comments are notes when humans read the program
- Comments from # to the end of the line
-
Between "" does not work as a comment
- Disabling a part of the program with a comment is called commenting out.
- From'''to''' is treated as a comment on multiple lines
- I think I'm skipping a little here
- #Coding: utf-8 is an important thing that clearly shows that the Python code is written in UTF-8.
Exercises
- All 2 titles
- How to use comment out
chapter4: Let's display HTML (4:11)
- Display the html tag together with the print statement
- The output field of paiza.io can display the result in TEXT or HTML.
- h1 / b / p / br tags etc. will appear
- The print function adds a line feed code at the end of the line
- Multi-line strings can be enclosed in'''to'''
- Even if you connect character strings with half-width commas, they can be displayed without line breaks.
`print ('HOGE', end =" ")`
can also omit line breaks
Exercises
- All 2 titles
- Exercise to add html tags in print text
chapter5: Let's use variables (3:24)
- A variable is a container that temporarily holds data.
- Easy conversion by making duplicate strings into variables
Substitute using * =
- Can be combined with variable + string
Exercises
- All 4 titles
- From around here, sometimes it took time to judge the exercise and an error occurred.
chapter6: Let's make dice (4:25)
-
A program that displays numbers at random
-
Variables can contain numbers as well as strings
-
Do not quote unlike strings
-
When concatenating with a string, use `str (variable containing a numerical value) + string`
-
Use random / randint
-
``` random.random ()` `` is a random number in 0-1
-
`random.randint (1,100)`
is a random number in 1,100
-
import is now available
-
What is import?
-
Use modules
-
Used in the form of module.function
-
print / str etc. are built in as standard
-
The content of () in ``` print ()` `` is an argument
-
The processing result of the function is called the return value
Exercises
- All 2 titles
- Here you have reached learning level 6
chapter7: Let's calculate with operators (4:25)
- How to calculate numerical values
- The contents of the variable itself do not change unless reassigned
- Calculate with operators (+ / = etc.)
- Basic operators
- Algebraic operator
- +,-, *, /,% etc.
- / Prefers over * +,-
- Use
`()`
to specify the priority
Exercises
chapter8: Let's calculate the price (3:17)
- Since the number of apples is randomly determined, multiply it by the unit price to obtain the total.
- If you add 100 to the result of randint, you can get the number in 100 increments.
Exercises
- All 1 titles
- For some reason, I couldn't pass the test case, so when I looked at the model answer, I had to include punctuation marks that weren't in the question sentence in the output result ...
chapter9: Let's learn the data type (3:32)
- Quotation marks for strings, numbers as they are
- There are various data types such as numbers and strings in programming
- Difference between + as a concatenation of strings and + of numbers
- Since the data type is different, the combination of numerical data and character string data cannot be done as it is (use str).
Exercises
- All 3 titles
- Operations between different data types
Rough impression
For the time being, I finished Introduction 1. I haven't come up with something like Python yet. It's really a level of teaching material for programming beginners to start learning Python. If it was a programming introductory book, I felt that I was doing the contents equivalent to Chapter 1 carefully. I would like to find time and check Primer 2.
By the way, the whole story comes with voice guidance for the character "Kyoko Kirishima" (cv: Emi Uema). It seems to be a popular character of Paiza. It's a little quick, but it's a little slower than Dot Install, who can also learn from the video. I didn't feel like I was being chased.
Basically, only the coding screen is shown in the video, and "Kyoko Kirishima" is hardly shown, so it wouldn't be embarrassing to do it in-house.