Compare commits
No commits in common. "23eec468cf9b796608cad1001fc48bec784e683c" and "d97e42d71701066a19cf590132b2766e03dc0346" have entirely different histories.
23eec468cf
...
d97e42d717
|
@ -1,2 +0,0 @@
|
|||
user_input = input().split()
|
||||
print(int(sum(map(int, user_input)) / len(user_input)), max(map(int, user_input)))
|
|
@ -1,3 +0,0 @@
|
|||
user_input = input().split()
|
||||
|
||||
print(*sorted([i for i in list(map(int, user_input)) if i >= 0]), '', end='')
|
|
@ -1,4 +0,0 @@
|
|||
user_input = input().split()
|
||||
|
||||
for element in user_input:
|
||||
print(element, user_input.count(element))
|
|
@ -1,9 +0,0 @@
|
|||
replacement_list = dict((k.strip(), v.strip()) for k,v in
|
||||
(item.split() for item in input().split(' ')))
|
||||
|
||||
lab_text = input()
|
||||
|
||||
for element in replacement_list:
|
||||
lab_text = lab_text.replace(element, replacement_list[element])
|
||||
|
||||
print(lab_text)
|
|
@ -1,9 +0,0 @@
|
|||
user_input = input()
|
||||
test_grades = list(map(int, user_input.split())) # test_grades is an integer list of test scores
|
||||
|
||||
|
||||
sum_extra = -999 # Initialize 0 before your loop
|
||||
|
||||
sum_extra = sum([i for i in test_grades if i > 100]) - (len([i for i in test_grades if i > 100]) * 100)
|
||||
|
||||
print('Sum extra:', sum_extra)
|
|
@ -1,10 +0,0 @@
|
|||
user_input = input()
|
||||
hourly_temperature = user_input.split()
|
||||
|
||||
result = []
|
||||
|
||||
for temp in hourly_temperature:
|
||||
result.append(temp)
|
||||
result.append('->')
|
||||
result.pop()
|
||||
print(*result, '')
|
|
@ -1,20 +0,0 @@
|
|||
user_input= input()
|
||||
lines = user_input.split(',')
|
||||
|
||||
# This line uses a construct called a list comprehension, introduced elsewhere,
|
||||
# to convert the input string into a two-dimensional list.
|
||||
# Ex: 1 2, 2 4 is converted to [ [1, 2], [2, 4] ]
|
||||
|
||||
mult_table = [[int(num) for num in line.split()] for line in lines]
|
||||
|
||||
def print_array(array):
|
||||
result = []
|
||||
for row in array:
|
||||
result = []
|
||||
for column in row:
|
||||
result.append(column)
|
||||
result.append('|')
|
||||
result.pop()
|
||||
print(*result)
|
||||
|
||||
print_array(mult_table)
|
Loading…
Reference in New Issue