This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import csv | |
class Readname(): | |
def __init__(self, loc): | |
self.loc = loc | |
# get list of filenames in the folder | |
def listNames(self): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'''1. | |
If you are a list of integers (that are non negative) write a program to return an integer list of the | |
rightmost digits. | |
right([1,22,94]) ->[1,2,4] | |
right([10,0]) ->[0,0] | |
''' | |
def right(lst): | |
new_lst = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if request.method == "POST": | |
option = request.form.get('option') | |
num1 = request.form.get('num1') | |
num2 = request.form.get('num2') | |
if option == "Addition": | |
data = num1 + num2 | |
elif option == "subtraction": | |
datd = num1 - num2 | |
elif option == "subtraction": |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def hello(x): | |
return f"Hi, {x}" | |
h = hello("Sid") | |
print(h) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def hello(x): | |
return "hello", x | |
print(Sid) |