Deliverables: There are four deliverables for this individual assignment. Please submit the following files to zyBooks: • pig_latin.py leet_speak.py vector_math.py ● kaprekars_constant.py . kaprekars_challenge.py (optional)
Problem 7.2 Write a function named collatz () that has one parameter named number. If number is even, then collatz() should return number // 2. If number is odd, then collatz () should return 3* number + 1. Call the function three times with arguments 300, 30 and 19 as follows: print (collatz (300)) print(collatz (30)) print(collatz(19))
Problem 7.3 Now write a program that lets the user type in an integer and that keeps calling collatz () on that number until the function returns the value 1. You may have to restart the kernel, if the program hangs up (see last lecture notes). Hint: Recall the break statement
Problem 7.4 Write a function day_name that converts an integer number 0 to 6 into the name of a day. Assume day 0 is "Sunday". Return None if the arguments to the function are not valid.
Problem 7.5 Write the inverse function day_num which is given a day name, and returns its number. Once again, if this function is given an invalid argument, it should return None.
Problem 7.6 Using the two functions above, write a function day_add () that helps answer questions like **Today is Wednesday. I leave for a vacation in 19 days time. What day will that be?" So the function must take a day name and a delta argument - the number of days to add-and should return the resulting day name: • day_add("Monday", 4) should return "Friday" • day_add("Tuesday", 0) should return "Tuesday" • day_add("Tuesday", 14) should return "Tuesday" • day_add("Sunday", 100) should return "Tuesday"
The LALA Shaleh wants to develop a python application which would help to compute the price for its Vilas' reservations and print the receipt. Write a python program would prompts the user to select the type of villa: Standard or VIP. Each villa costs as follows: Standard: 450KD, and 500KD with breakfast for 4 people. VIP: 800 with free breakfast for 7 people. Next, the program should prompt the user to enter the number of nights. In case the number of nights is greater than 3 and the selected villa is VIP, then LALA Shaleh offers the visitors a free dinner at the "Boom luxury restaurant". Then the program should ask the user whether the visitors would like to add room cleaning as a service. A standard villa costs 20KD per day, while VIP costs 40KD.
For this programming assignment you will implement the Lenet 5 CNN using either pytorch or tensorflow, but not Keras. You can take a look to other implementations in internet but please, when coding use your personal coding style and add references to your sources. The goal of this implementation is that you completely understand what happens in the code because our TA will ask you questions about it when reviewing your assignment (you need to make an appointment with your TA for this). Here is an implementation in PytorCH Tutorial Github Here is an implementation in Tensorflow (careful: the tutorial and implementation don't match, I couldn't find the pair from the same author)! - Tutorial - Github Test your implementation with the MNIST dataset from Kaggle.
Payroll management system is the process where the employers' pay salaries to their employees. You are required to develop one Payroll Management System to generate employee salary and payslip.
For final project, you will develop an automated web crawler to collect data from a website of your choice, store them in a database, and perform data analytics using Python. 1) First, identify a website as your data source, then identify target data fields your team plans to collect. You should aim to collect as much data as possible, even if you do not initially expect to use some data fields for analysis. This is because retroactive collection could be time-consuming if you find that you are missing some needed data later on. 2) Set up a database to store your data. a) You can use any database, including sqlite3, MS SQL Server, MySQL, MongoDB, etc. But note that Excel or a csv file is not a database. b) Based on the data fields you identified from the website, design and create one or more tables that host your dataset to be collected. c) After finalizing your database tables, develop the web crawler so that it directly inserts data into your database (instead of, for example, downloading files as a csv file first, then importing the csv file into the database). 3) Based on collected data in the database, perform some analyses to obtain insights. The types of analyses can include at least two of the following (but not limited to): a) Descriptive analysis b) Visualization c) Regression d) Sentiment analysis e) Other text mining analysis 4) Present your work in a video presentation.