We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2f011b0 commit a72edd9Copy full SHA for a72edd9
01_53_projects/06_Functions/09_sentence_generator.py
@@ -0,0 +1,19 @@
1
+def sentence_generator(word,part_of_speech):
2
+ if part_of_speech == 0:
3
+ print(f"I am excited to add this 033円[1;3m{word}033円[0m to my vast collection of them!")
4
+ elif part_of_speech == 1:
5
+ print(f"t's so nice outside today it makes me want to 033円[1;3m{word}033円[0m!")
6
+ elif part_of_speech == 2:
7
+ print(f"Looking out my window, the sky is big and 033円[1;3m{word}033円[0m!")
8
+ else:
9
+ print("Part of speech must be 0, 1, or 2! can,t make a sentence")
10
+
11
12
+def main():
13
+ word : str = input("033円[34mPlease type a noun, verb, or adjective : 033円[0m")
14
+ print("Is this a noun, verb , or adjective? ")
15
+ part_of_speech : int = int(input("033円[34mType 0 for noun, 1 for verb, 2 for adjective :033円[0m "))
16
+ sentence_generator(word,part_of_speech)
17
18
+if __name__ == "__main__":
19
+ main()
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments