Hello
tl;dr
Implement a program that prints out a simple greeting to the user, per the below.
$ python hello.py
What is your name?
David
hello, David
Specification
-
Write, in a file called
hello.py
in~/workspace/pset6/hello
, a program that prompts a user for their name and then printshello, so-and-so
, whereso-and-so
is their provided name, exactly as you did in Problem Set 1, except that your program this time should be written (a) in Python and (b) in CS50 IDE.
Walkthrough
Note: The walkthrough video does not presuppose that you need to greet your user by name, but per this specification, your program should behave identically to that in Problem Set 1.
Usage
Your program should behave per the example below. Assume that the underlined text is what some user has typed.
$ python hello.py
What is your name?
Veronica
hello, Veronica
Staff Solution
To run the staff’s implementation of hello
, execute the below.
~cs50/2019/x/pset6/hello
How to Submit
Execute the below, logging in with your GitHub username and password when prompted. For security, you’ll see asterisks (*
) instead of the actual characters in your password.
submit50 cs50/problems/2019/x/sentimental/hello
You can then go to https://cs50.me/cs50x to view your current scores!