Overview: Environment, Types and Variables

(授業の概要、演習環境、データ型と変数)

Computing Practice I

1st lecture, April 12, 2018

http://www.sw.it.aoyama.ac.jp/2018/CP1/lecture1.html

Martin J. Dürst

duerst@it.aoyama.ac.jp

O 棟 529 号室

テュールスト マーティン ヤコブ

AGU

© 2005-18 Martin J. Dürst 青山学院大学

授業前の準備

 

Today's Schedule

 

授業の位置づけ

 

約束事

 

独力・独走の約束

 

不正行為

 

成績評価方法

授業中の演習課題とミニテスト、期末試験で総合的な評価

 

成功するには

 

Moodle

https://moo.sw.it.aoyama.ac.jp (same as Discrete Mathematics I)

Enrollment key: [secret]

If you forgot your password, use "Forgotten your username or password?" on the login page.
(caution: only enter either the username or the email address, not both)

 

Minitest

 

Handouts

 

Structure of Weekly Lectures

 

教科書

題名: 新版 C 言語プログラミングレッスン 入門編

著者: 結城 浩 著

出版社: SB Creative

ISBN: 4-7973-3678-1

定価 本体 2,000 円 + 税

 

C Basic Data Types

 

Attention: \ vs. ¥

 

演習の環境

 

How to use cygwin

便利な命令:

フォルダの作成: mkdir newfolder (例: mkdir CP2017)

フォルダへの移動: cd CP2017
(フォルダ名とフォルダ名の間は \ のではなく /)

Windows のフォルダへの移動 (C: ドライブの場合): cd /cygdrive/c

現在のフォルダの場所の表示: pwd

現在のフォルダの内容の表示: ls (又は dir)

 

A Simple C Program

(the most famous C program)

#include <stdio.h>

int main (void)
{
printf ("Hello World!\n");

return 0;
}

 

Program Compilation and Execution

To avoid overwriting a.exe:

 

Edit - Compile - Go

Programming is mostly a repetition of the following three activities:

  1. Edit: Write or fix the program
  2. Compile: Compile the program from a human-readable form to a form that the computer can execute
  3. Go: (Try to) execute the program

[For interpreted programming languages (e.g. Ruby), steps 2 and 3 are combined.]

 

Installing cygwin and gcc

(detailled explanation with pictures)
(for Windows; ask for instructions if you use a Mac)

 

How to Ask Questions

 

Program Checking System

 

ユーザ登録・授業登録

 

Overall Program Checking System Error

If there is an overall error in the Program Checking System, a message such as Ruby on Rails application could not be started is displayed. Leave the screen as is, and inform me immediately.

Image of browser screen showing message "Ruby on Rails application could not be started"

 

Partial Program Checking System Error

If there is a partial error in the Program Checking System, a message such as We're sorry, but something went wrong. Leave the screen as is, and inform me immediately.

We're sorry

 

Server Error

If there is a server errror, a message such as Internal Server Error is displayed. Leave the screen as is, and inform me immediately.

 

Program Checking System 等がアクセス不可

 

Program Checking System Result Display

Example for Success

Congratulations, you successfully completed this assignment and received 100.0 points.

Attempt registered.

注: Indent 関係の表示は今週無視してください。

 

Program Checking System Result Display

Example for Problem

Expected output and actual output differ at line 3, see below. Submission rejected, please submit again. Actual output line: 4 is not a prime number. Expected output line: 4 is not a prime number. Problem occured in execution check number 1.

Attempt registered.

Expected output and actual output differ at line 3, see below.
Submission rejected, please submit again.

Actual output line:
4 is not a prime number.

Expected output line:
4 is not a prime number.


Problem occured in execution check number 1.

 

Overview of Systems Used

 

Presentation of Teaching Staff

助教・助手

Teaching Assistants (TA)

 

演習問題の読み方

 

Today's Exercises

注: 一題ごと完成して、提出 (提出が遅くなると減点)
最終的な締切は4月15日 (日曜日) 22:00
Q&A Forum の受け付け締め切りは問題の締切の一日前 (今回は土曜日いっぱい)

 

次回への準備

 

Collection of「計算機実習 I のための準備」

演習に入る前に各列の担当の先生に返却

(名前、学生番号記入済み、完成した宿題のところ☑入り)

 

Glossary

handout
配布資料
data type
データ型
integer
整数
floating point number
浮動小数点数
character encoding
文字コード
syntactical
文法上の、構文上の
full width
全角
(to) compile
コンパイル (する)
program (名)
プログラム
(to) program
プログラムを書く、など
programming
プログラムを書く作業 (成果物には絶対使ってダメ)
compilation
コンパイル (名詞)
execution
実行