Skip to content

Jorgejfp/Python_Proj_Hotel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

144 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Python Languaje

Descripción de la Imagen

• Basic python (operators, conditions, while loop, user interaction) • Data structure (sequence, list, tuple, dictionary)

1- Create a program named divisor_python.py

  1. you should write a script that asks a user for a number. Then, print out if the number is even or odd
  2. and then it prints out a list of all the divisors of that number. (If you don’t know what a divisor is, it is a number that divides evenly into another number. 2- Create a file named list_python.py
  3. You should write a program that takes 5 names from user input and save them in a list
  4. Print out sorted names alphabetically in one line.
  5. Ask user to enter another name and add it to the list using built-in functions
  6. Print out names in reverse order(alphabetically)
  7. Take a name from user and check if that name is in the list using in operator. You should print out if name is in the list or not . For example: ********* Jane is not in the list ********** 3- Create a file and named it data_structure.py
  8. Create a tuple named table_tuple which length is 4 by 4 including multiply table 1 to 4(fig-2) Important: Do not use any loop functions to create table of 4.
  9. Take 2 integer numbers from user. 1st value indicates item in raw and 2nd value indicates item in column.
  10. printout result from table_tuple using 2 integer values from input. Don’t forget that index in tuple starts from 0

image Fig-1

  1. Print out whole table same as following image (you’d better to use concatenation, string format and 2 while loops) Tip: you can use \t for to separate numbers in each row

image Fig-2

4- Create a file named students_dict.py

  • Write a script that takes values from user input and save them in a dictionary. This dictionary gets student number(integer) as a key and name as a value
  • The dictionary has 4 items which are students (you should use while loop to repeat previous step)
  • Printout all students. Look at following image
  • You must add every 2 students in a different program and print out the result (two programs needed are Science and Health). Look at following image.
  • Ask user to select option 1 or 2 as a number and then use that number to select one of the programs. Finally print out all 2 students belong to the program. Look at carefully to the following image.

image

About

Basic python (operators, conditions, while loop, user interaction), Data structure (sequence, list, tuple, dictionary)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages