Skip to content

Latest commit

 

History

History
15 lines (8 loc) · 1004 Bytes

python-linux-tasks.md

File metadata and controls

15 lines (8 loc) · 1004 Bytes

Python programs on Linux

  1. Create a simple python program that prints Hello World on Linux and execute the program using the ./ notation and by calling the Python interpreter from the Linux shell.

  2. Create a simple python program that prompts the user to enter something and then use if/elif/else tests to print different responses depending on what the user enters.

  3. Create a python program to create a new directory under your home directory and create two files inside the newly created directory using touch.

  4. Create a new Linux user using a Python program and confirm that you can log in as the new user.

  5. Create a program to add the user created in the previous exercise to the wheel group. Test that the user can now use sudo.

  6. Create a Python program to create a text file in your home directory containing the usernames of 5 new users.

  7. Create a python program to read the users one by one from the file created in exercise 6 and add a Linux user for each user in the file.