Enterprise Shell Programming basic problem solving practice-is a mule is a horse yo-yo!

Source: Internet
Author: User

The old boy Yun-dimensional class 25-26 period, nearly 350 students, about to accept the Shell Advanced Programming Course baptism, first give everyone to a scare topic it!

Tips:

Prohibit any search, self-suppressed is the hero!

Search for a meeting, it is only the level of consciousness, using the knowledge of the brain to engage in their own, is to the subconscious level!

Enterprise interview written, Oral asked you, must be to the subconscious level to easily answer, this is also the old boy education focus on the students learning effect, take pen can write, openings can be written orally.


1. Use the shell or Python to write a square (oldboy4.sh) to receive the number entered by the user.

Example 1: Implemented with the + sign

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/76/D7/wKioL1ZddXzxdDItAAAMqGAPHiU125.png "title=" 1.png " alt= "Wkiol1zddxzxdditaaamqgaphiu125.png"/>

Example 2: implementation by number

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/76/D8/wKiom1ZddnugOMXIAAAQm74ImVE980.png "title=" 2.png " alt= "Wkiom1zddnugomxiaaaqm74imve980.png"/>

2. Write a isosceles triangle (oldboy2_triangle.sh) in shell or Python to receive the number entered by the user.

Example: using the * number to achieve

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/76/D7/wKioL1Zdd7GjpgJhAAAl8uhVQr4900.png "title=" 3.png " alt= "Wkiol1zdd7gjpgjhaaal8uhvqr4900.png"/>

3. Use shell or Python to write a right-angled trapezoid program (OLDBOY4.SH) to receive user input parameters N,m

Example: using the * number to achieve

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/76/D7/wKioL1ZdeETSl841AAAbUVLDJ2U664.png "title=" 4.png " alt= "Wkiol1zdeetsl841aaabuvldj2u664.png"/>


Please pay attention to the Official Group 09 Group 385168604 (marked 51CTO) or post-publication comments, there are a lot of friends will give the answer.

In fact, the answer is not important, the key is that you can also be like the old boy's students, take a pen to write, mouth can be programmed.

This article is from the "Old boy Linux ops" blog, please be sure to keep this source http://oldboy.blog.51cto.com/2561410/1718607

Enterprise Shell Programming basic problem solving practice-is a mule is a horse yo-yo!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.