From Python to C++ — and Why the Difference Matters
You already have a working Python program. You are going to write it again in C++, line for line, and reproduce its worst bug on purpose. Along the way you find out why the compiler wants to know the size of the box before you put anything in it, and why the error now arrives before the program has even run.
- trending_upIntermediate
- schedule6h 15m
- menu_book12개 강의
- publicEnglish
- workspace_premiumBasic
개요
This is not a C++ course for people who have never programmed. It is a second language for someone who has a first one, taught entirely by contrast. Python let you write `age = 11` and never asked what `age` was. C++ makes you declare it, and it makes you choose between six kinds of box before you have put anything in one. That is annoying for about two hours and then it is the reason your program runs fast enough to finish inside a four-second limit. The spine of the segment is a port. You take the small question-and-answer script from the Python track — the one that asks your name, asks your favourite food and judges the answer — and you rebuild it in C++ a line at a time. Then you type your answer with a trailing space and it fails in exactly the same way it failed in Python. That is the point of the whole exercise. The trailing space was never a Python bug. It was an input bug, and it followed you. The last module points at USACO Bronze: what a competitive problem actually looks like on paper, how the input arrives, why the array is fixed at a thousand before you have read a single number, and why nearly everyone in that room is writing C++.
강의 커리큘럼 · 4개 모듈
lock접근 시 이용 가능- 01 The Box Has a Size3개 강의·1h 22m
Python worked out what you meant. C++ makes you say it in advance, once, and then holds you to it for the rest of the program. Everything in this module is that one trade, examined.
- 02 Where the Error Arrives3개 강의·1h 23m
Python runs a line, then reads the next one. C++ reads the whole file, refuses it if any part of it is wrong, and only then produces something you can run. Nothing you wrote today runs until all of…
- 03 The Port3개 강의·1h 55m
Port it, do not rewrite it. Same order, same questions, same output. If you improve it while you translate it you will not be able to tell which differences are C++ and which are you.
- 04 The Shape of a Contest Problem3개 강의·1h 35m
A contest problem is a contract. Input format, output format, constraints, limits. Read the constraints before you think about the algorithm — they are telling you which algorithm is allowed.
자주 묻는 질문
- From Python to C++ — and Why the Difference Matters에서 무엇을 배우나요?
- You already have a working Python program. You are going to write it again in C++, line for line, and reproduce its worst bug on purpose. Along the way you find out why the compiler wants to know the size of the box before you put anything in it, and why the error now arrives before the program has
- 사전 경험이 필요한가요?
- From Python to C++ — and Why the Difference Matters을 시작하기 전에 기초 지식이 있으면 좋아요.
- From Python to C++ — and Why the Difference Matters은 얼마나 걸리나요?
- From Python to C++ — and Why the Difference Matters은 4개 모듈과 12개 강의로 구성되어 있고, 자신의 속도로 학습할 수 있어요.
- 어떻게 접근하나요?
- From Python to C++ — and Why the Difference Matters은 모든 유료 구독에 포함되어 있어요.