Skip to content

Instantly share code, notes, and snippets.

@mayankdawar
Created February 22, 2020 20:06
Show Gist options
  • Select an option

  • Save mayankdawar/d9c309aa5707467ef13d5565c20c906a to your computer and use it in GitHub Desktop.

Select an option

Save mayankdawar/d9c309aa5707467ef13d5565c20c906a to your computer and use it in GitHub Desktop.
Below are a set of scores that students have received in the past semester. Write code to determine how many are 90 or above and assign that result to the value a_scores.
scores = "67 80 90 78 93 20 79 89 96 97 92 88 79 68 58 90 98 100 79 74 83 88 80 86 85 70 90 100"
lst = scores.split()
a_scores = 0
for i in lst:
if int(i) >= 90:
a_scores += 1
@salma09920
Copy link

Write code that uses the string stored in org and creates an acronym which is assigned to the variable acro. Only the first letter of each word should be used, each letter in the acronym should be a capital letter, and there should be nothing to separate the letters of the acronym. Words that should not be included in the acronym are stored in the list stopwords. For example, if org was assigned the string “hello to world” then the resulting acronym should be “HW”.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment