-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAssignment_2_Lets_Upgrade.py
More file actions
40 lines (21 loc) · 948 Bytes
/
Assignment_2_Lets_Upgrade.py
File metadata and controls
40 lines (21 loc) · 948 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env python
# coding: utf-8
# In[ ]:
# ASSIGNMENT DAY 2 Solution
# PROJECT :
#
# Let's say, you are in a lottery competition. A group of words has been given to you and you are asked to select any one character(only alphabets) which will get you a prize. You are a smart person and you thought of a way to select a character that will have maximum chances of winning a prize i.e. select the highest occurring character from the words.
#
#
# In[8]:
lottery = "hello coders"
# 'h' or 'e' or 'o' or 'c' or 'd'
print("choose correct character of the word '",lottery,"' to win the lottery")
inputs = input(" ")
if inputs == lottery[0].lower() or inputs == lottery[1].lower() or inputs == lottery[4].lower() or inputs == lottery[6].lower() or inputs == lottery[8].lower():
print("congratulation,you win thwe lottery")
else:
print("sorry, You didn't win the lottery")
# In[ ]:
# Submitted by Vikas Dubey
# In[ ]: