ICP2 - narhirep/Python-Deep-Learning GitHub Wiki
In Class Programming:
1. Write a program, which reads height(feet.) of N students into a list and convert these heights to cm in a separate list:
We take input from user for N number of students. I am using two different lists, one for height in feet and one for height in Cms.
So using below formula I am converting feet into Cms.

OUTPUT: We see 2 different lists as above in screenshot. One list is height in feet and one is height in Cms.
2. Given a non-negative integer num, return the number of steps to reduce it to zero. If the current number is even, you have to divide it by 2, otherwise, you have to subtract 1 from it.”
I have used a while loop iteration where the number is checked constantly. If the number is even, it is divided by 2 and if it is odd then it is subtracted by 1. This iteration will stop when the number is reduced to 0.

OUTPUT: We can see the entered number and number of steps to perform this operation.
3.Write a python program to find the word count in a file for each line and then print the output. Finally store the output back to the file.
Taking txt file as input with some words inside it.
So in this program, the input file is opened and read line by line until an empty line is encountered. The words are split by delimiter and each word is added to the dictionary variable. If a word is already present in the dictionary then the current count is increased by 1 and if it is a new word then it will be added as new in the dictionary.

OUTPUT: In an output we can see the word counts appeared in a run output window.
Video Link : https://youtu.be/FmLdwCAgZOI (Sorry for 5 mins video, it was my first time to record like this, I will try to improve )
CONCLUSION: So I have learned about while and for loops as well as reading from a file and writing into the file. Dictionaries are very interesting and useful, need to learn more about them.