# Do you know what Artificial Intelligence is? 
# Artificial is human-made things, like computers, machines, robots, etc. We can put intelligence into any machine by giving all possible answers and the program to the machine to choose the correct answers. For this IF -Else are the building block.
# Can you give some examples of robots and the work they do? 
# Robots are machines resembling a human being or animal that can function like them.
# For example talking, moving, running, opening the door etc
# Let us watch a video that shows you some examples of robots
# Do you want to see how you can convert your computer that talks and plays games with you?
# Here we go! 
'''Task 1: '''
print("**** Task 1: ****")
print()
# Uncomment the statements below and click Run

print("hello, my name is Games Robot.")
name=input("What is your name?\n")
print("Well, it is nice to meet you ",name)
day=input("What day is it today? ")
print("Thanks ",name, "now I remember it is ",day,".")
today=int(input("So are you at school today? 1=yes 2=no :"))
if today==1:
   lesson=int(input("Are you studying computer science today? 1=yes 2=no"))
   if lesson==1:
      print("Great, I like computers, I'll help you!")
   else:
      print("Aww, I hope you get to study computer science soon. You know I love coding.")
elif today==2:
   print("It would have been fun to be at school")
else:
   print("Looks like you did not pick the correct choice. Anyways lets keep talking.")
print("Lets play a game ", name)
num=int(input("I'm thinking of a number between 1 and 10 and you have to take a guess. What's your first guess?"))
if num==7:
   print("Yay you guessed it!")
else:
   if num>7 or num<7:
    print("I'll give you one more chance to guess.")
    num1=int(input("Guess again?"))
    if num1==7:
        print("Yay!You guessed correct")
    elif num1<7:
        print("That was low. The number was 7")
    else:
        print("That was high. The number was 7")
   else:
     print("Sorry. Wrong Guess")  


'''Task 2: Lets play a game'''
print("**** Task 2: ****")
print()
#Write a program that gets your computer to play a game with the user.
#Here are some ideas:
#Treasure Hunt - Provide a set of clues and based on the response take the user towards the treasure
#Geometry Game - Provide clues to geometric shapes and get the user to guess the shape . Here are some questions you could ask:
# How many sides does a pentagon have? Answer: 5
# What is the name of 4 sided polygon? Answer: quadrilateral
# How many angles are there in a triangle? Answer 3
print("Welcome to the swimming quiz!\n Let's see your knowledge on competitive swimming.\n I will ask you six questions, and at the very end I will give you one of these rankings:\n Noob\n Starter Guy\n Normal Guy\n Pro\n Epic\n Elite\n ")
name = input("Before we start the quiz, what is yor name?")
score = 0
Q1= int(input(f"{name}, here's your first question.\n How many strokes are there in competitive swimming?\n"))
if Q1 == 4:
    print(" Yay! You got it correct.")
    score = score + 1
else:
    print("Sorry the correct answer was 4.")
    
Q2= int(input(f"{name}, here's your second question.\n What is the world record for most number of gold medals won in a single Olympic Games?\n"))
if Q2 == 8:
    print(" Yay! You got it correct.")
    score = score + 1
else:
    print("Sorry the correct answer was 8.")

Q3= input(f"{name}, here's your third question.\n Who holds the world record for most gold medals in a single Olympic Games?\n")
if Q3 == "Michael Phelps":
    print(" Yay! You got it correct.")
    score = score + 1
else:
    print("Sorry the correct answer was Michael Phelps.")

Q4= int(input(f"{name}, here's your fourth question.\n What year was the record for the most gold medals in a single Olympic Games made?\n"))
if Q4 == 2008:
    print(" Yay! You got it correct.")
    score = score + 1
else:
    print("Sorry the correct answer was 2008.")

Q5 = input(f"{name}, here's your fifth question.\n What country did Michael Phelps swim for?\n")
if Q5 == "USA" or Q5 == "United States of America" or Q5 == "US":
    print(" Yay! You got it correct.")
    score = score + 1
else:
    print("Sorry the correct answer was USA.")

Q6= float(input(f"{name}, here's your second question.\n What is the world record for the men's 100 meter butterfly in a 50 meter pool to the exact hundredth of a second?\n"))
if Q6 == 49.45:
    print(" Yay! You got it correct.")
    score = score + 1
else:
    print("Sorry the correct answer was 49.45.")

if score == 6:
    print("Congratulations! YOU GOT EVERY SINGLE QUESTION RIGHT! You got 6/6. You are an Elite!")
elif score == 5:
    print("Congratulations! You got 5/6 questions right! You are an Epic ")
elif score == 4:
    print("Congratulations! You got 4/6 questions right! You are a Pro ")
elif score == 3:
    print("Congratulations! You got 3/6 questions right! You are a Normal Guy")
elif score == 2:
    print("You got 2/6 questions right! YOU FAILED! You are a Starter Guy! Better luck next time. ")
elif score == 1:
    print("You got 1/6 questions right! YOU FAILED! You are a noob. Better luck next time. ")
elif score == 0:
    print("You got 0/6 questions right! YOU FAILED! YOU GOT EVERY SINGLE QUESTION WRONG! You are a noob. Better luck next time. ")
else:
    print("Your score was not calculated properly please try again.")




    





'''Great! You did fantastic in creating your game!! '''

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: