COMP 1405 Lecture Notes - Lecture 4: Rot13, Ethiopian Aristocratic And Court Titles, Exponentiation

41 views2 pages

Document Summary

Reads a string that has been typed in using the keyboard. Expects one (optional) argument: the string to be displayed to prompt the user to type: function name (argument1, argument2) If used as the right-hand side of an assignment statement, the data typed is assigned to a variable. Since input can be used as a right-hand side of an assignment statement, it is said to have a (cid:862)return value(cid:863) Input produces return value: ex. when this function has completed, there is a value given to the program that o(cid:396)igi(cid:374)all(cid:455) (cid:862)called(cid:863) it. The (cid:862)input(cid:863) function once called, will return a string. The (cid:862)print(cid:863) fu(cid:374)(cid:272)tio(cid:374) e(cid:454)pe(cid:272)ts a(cid:374) argument; this argument can also be a string. These function calls can be chained together to create an (cid:862)echo(cid:863) utility. P(cid:396)og(cid:396)a(cid:373)s w(cid:396)itte(cid:374) a(cid:272)(cid:272)o(cid:396)di(cid:374)g to the pipeli(cid:374)e patte(cid:396) a(cid:396)e (cid:272)hai(cid:374)s of p(cid:396)o(cid:272)esses whe(cid:396)e the (cid:862)output(cid:863) of ea(cid:272)h p(cid:396)o(cid:272)ess is the (cid:862)i(cid:374)put(cid:863) fo(cid:396) the su(cid:271)se(cid:395)ue(cid:374)t p(cid:396)o(cid:272)ess (cid:862)i(cid:374)put-process-output(cid:863) .

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents