This file contains 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
#Write your solution (for loop) | |
toppings = ['sprinkles', 'chocolate syrup', 'whipped cream', 'nuts', 'cherries']; | |
# Prompt the user to enter a letter | |
letter = input("Enter a letter to find the first topping starting with that letter: ").lower(); | |
for item in toppings: | |
if (item[0] == letter): | |
print(f"First topping starting with '{letter}': {item}"); | |
break; |
This file contains 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
using System.Collections.Generic; | |
using System.Runtime.CompilerServices; | |
using FluentAssertions; | |
using McUtilities.Memory; | |
using NUnit.Framework; | |
namespace McUtilitiesTest | |
{ | |
public class QuickDictionaryTests | |
{ |