20 lines
395 B
Markdown
20 lines
395 B
Markdown
Quick Exercise — Variables
|
||
|
||
Try writing a small script (your language of choice) that:
|
||
|
||
Asks the user for their name.
|
||
|
||
Accept the name only if:
|
||
1. Length ≤ 20
|
||
2.First character is a letter
|
||
3.Contains no digits
|
||
4.Contains no spaces
|
||
|
||
This tests:
|
||
✔ Reading input
|
||
✔ Using variables
|
||
✔ Printing output
|
||
|
||
Reply here with your solution — I’ll give feedback.
|
||
|
||
I will use c for this exercises |