ICP 2 - Murarishetti-Shiva-Kumar/Python-Deep-Learning-Programming GitHub Wiki
Lesson2: Loops, List, Tuples, Functions in python
Write a program, which reads weights (lbs.) of N students into a list and convert these weights to kilograms in a separate list using:
1) Loops and
2) List comprehensions
N: No of students (Read input from user)
Source Code:
Output:
Write a program that returns every other char of a given string starting with first using a function named “string_alternative”
Str = “Good evening”
Output: Go vnn
Note: You need to create a function named “string_alternative” for this program and call it from main function
Write a python program to find the wordcount in a file for each line and then print the output. Finally store the output back to the file.
Input: a file includes two line
Python Course
Deep Learning Course
Output:
Python: 1
Course: 2
Deep: 1
Learning: 1
Note: Your program should work for any number of lines
Input File:
Source Code:
Output File: