Compare commits

..

No commits in common. "2bbeb9da0699e6c55f4253f344f3826f7a9d553c" and "386a40fc70cf0e63b19ce5da3bc9185f2b4de87a" have entirely different histories.

11 changed files with 0 additions and 143 deletions

View File

@ -1,13 +0,0 @@
user_score = 0
simon_pattern = input()
user_pattern = input()
#user_score = sum(a==b for a, b in zip(simon_pattern, user_pattern))
for char in enumerate(list(simon_pattern)):
if user_pattern[char[0]] == char[1]:
user_score += 1
else:
break
print('User score:', user_score)

View File

@ -1,12 +0,0 @@
user_text = input()
autograder_exceptions = ['!']
def count_letters(string):
result = 0;
for letter in list(string):
if letter.isalpha() or letter in autograder_exceptions:
result += 1
return(result)
print(count_letters(user_text))

View File

@ -1,15 +0,0 @@
password = input()
replacements = {
'i' : '!',
'a' : '@',
'm' : 'M',
'B' : '8',
'o' : '.'
}
for replace, replacement in replacements.items():
password = password.replace(replace, replacement)
password += 'q*s'
print(password)

View File

@ -1,8 +0,0 @@
triangle_char = input('Enter a character:\n')
triangle_height = int(input('Enter triangle height:\n'))
print('')
for row in range(1, triangle_height + 1):
for col in range(row):
print(triangle_char, end=' ')
print('')

View File

@ -1,42 +0,0 @@
# Construct a mad lib
class mad_lib:
# Initalize a constructor for python mad lib
def __init__(self, lib):
# lib is a value passed in during the construction of this class
self.text = lib
self.input = input().split()
# Replace %text% with user input
if '%first_name%' in self.text:
self.text = self.text.replace('%first_name%', self.first_name())
if '%location%' in self.text:
self.text = self.text.replace('%location%', self.location())
if '%whole_number%' in self.text:
self.text = self.text.replace('%whole_number%', self.whole_number())
if '%plural_noun%' in self.text:
self.text = self.text.replace('%plural_noun%', self.plural_noun())
def first_name(self):
#return input("A first name: ")
return self.input.pop()
def location(self):
#return input("A location: ")
return self.input.pop()
def whole_number(self):
#return input("A whole number: ")
return self.input.pop()
def plural_noun(self):
#return input("A plural noun: ")
return self.input.pop()
if __name__ == '__main__':
# Construct a mad lib
md = mad_lib('%first_name% went to %location% to buy %whole_number% different types of %plural_noun%')
print(md.text)

View File

@ -1,8 +0,0 @@
from mad_lib import mad_lib
while True:
md = mad_lib('Eating %whole_number% %plural_noun% a day keeps the doctor away.')
if 'quit' in md.text:
break
else:
print(md.text)

View File

@ -1,5 +0,0 @@
user_num = int(input())
while user_num >= 1:
user_num = user_num / 2 # We operate on the value first, before printing it
print(user_num)

View File

@ -1,9 +0,0 @@
num_insects = int(input()) # Must be >= 1
result = []
while num_insects <= 100:
result.append(num_insects)
num_insects = num_insects * 2
print(*result, end = ' ')

View File

@ -1,12 +0,0 @@
contact_emails = {
'Sue Reyn' : 's.reyn@email.com',
'Mike Filt': 'mike.filt@bmail.com',
'Nate Arty': 'narty042@nmail.com'
}
new_contact = input()
new_email = input()
contact_emails[new_contact] = new_email
for contact in contact_emails:
print('{0} is {1}'.format(contact_emails.get(contact), contact))

View File

@ -1,8 +0,0 @@
num_rows = int(input())
num_cols = int(input())
for _i in range(num_rows):
print('*', end=' ')
for _i in range(num_cols - 1):
print('*', end=' ')
print()

View File

@ -1,11 +0,0 @@
num_rows = int(input())
num_cols = int(input())
# Note 1: You will need to declare more variables
# Note 2: Place end=' ' at the end of your print statement to separate seats by spaces
for row_num in range(1, num_rows + 1):
for col_char in map(chr, range(ord('A'), ord('A') + num_cols)):
print('{0}{1}'.format(row_num, col_char), end=' ')
print()