View difference between Paste ID: JZbH8geR and SkDY19Ka
SHOW: | | - or go back to the newest paste.
1
### Strings Q1
2
# text = input("Enter a long sentence: ")
3
# print(text.count("the") + text.count("The"))
4
5
6
7
# par = '''On July 16, 1969, the Apollo 11 spacecraft launched from the Kennedy Space Center in Florida. Its mission was to go where no human being had gone before—the moon. The crew consisted of Neil Armstrong, Michael Collins, and Buzz Aldrin. The spacecraft landed on the moon in the Sea of Tranquility, a basaltic flood plain, on July 20, 1969. The moonwalk took place the following day. On July 21, 1969, at precisely 10:56 EDT, Commander Neil Armstrong emerged from the Lunar Module and took his famous first step onto the moon’s surface. He declared, That’s one small step for man, one giant leap for mankind. It was a monumental moment in human history.'''
8
9
### Strings Q2
10
# list_of_sentences = par.split(".")
11
# print("\n".join(list_of_sentences))
12
13
14
### Strings Q3
15
# word = input("Enter a word: ")
16
# result = ""
17
# for c in word:
18
# 	if c in "aeiouAEIOU":
19
# 		result += c.upper()
20
# 	else:
21
# 		result += c.lower()
22
# print(result)
23
24
### Strings 4
25
26
# resp = ""
27
# while resp != "exit":
28
# 	resp = input("Enter your email address")
29
# 	resp = resp.lower()
30
# 	if resp.count("@") == 1 and resp.count(".") >= 1:
31
# 		print("Valid Email")
32
# 	else:
33
# 		print("Invalid Email")
34
35
36
### Strings Q5
37
# resp = ""
38
# while resp != "exit":
39
# 	resp = input("Hey, What do you want to do today?")
40
# 	resp = resp.lower()
41
# 	if resp == "movies":
42
# 		print("I will open Netflix")
43
# 	elif resp == "music":
44
# 		print("I'll open Spotify.!")
45
# 	elif resp == "shopping":
46
# 		print("I'll enter Amazon")
47
# 	else:
48
# 		print("Sorry I don't understand.")
49
50
### Strings 4
51
52
# resp = ""
53
# while resp != "exit":
54
# 	resp = input("Enter your email address")
55
# 	resp = resp.lower()
56
# 	if resp.count("@") == 1 and resp.count(".") >= 1:
57
# 		print("Valid Email")
58
# 	else:
59
# 		print("Invalid Email")