head first java programming phần 2

Tôi khuyên bạn nên cuốn sách này cho bất cứ ai muốn bắt đầu mò trong lập trình nhưng không biết bắt đầu từ đâu. Tôi cũng muốn khuyên bạn nên cuốn sách này cho bất cứ ai không nhất thiết phải mới để lập trình, nhưng tò mò về Python. Đó là một đoạn giới thiệu tuyệt vời để lập trình nói chung và lập trình Python | starting to code Think about the original code. You will need to use more than just print commands to provide more informative feedback. What else will you need you are here 4 11 code is a highway You needed to decide what messages should be displayed to the user. Below is a table showing some typical values the user might enter. What did you think the message should say A program is more than a list of commands You could create a program that was simply a list of commands. But you almost never will. This is because a simple list of commands can only be run in one direction. It s just like driving down a straight piece of road there s really only one way of doing it. exjmp es J J thãi I that you vea dy print Howdy print Come again But programs need to be much smarter than that. 12 Chapter 1 starting to code Codeville Your program is like a network of roads Programs need to do different things under different circumstances. In the game the code displays You win if the user guesses the number correctly and You lose if not. This means that all programs even really simple programs typically have multiple paths through them. There are decision points in every program that are like road intersections. The Computer runs the takes through the Code. A path refers to the set of instructions that the computer will actually follow or execute . Your code is like a street network with lots of sections of code connected together just like the streets in a city. When you drive through a city you make decisions as to which streets you drive down by turning left or right at different intersections. It s the same for a program. It also needs to make decisions from time to time as to which path to take but for your code it is not like driving along a road it s executing a particular path. Let s look in more detail at how a program decides which path to take. you are here 4 .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.