Quantcast

A community for students. Sign up today!

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

ParthKohli

  • one year ago

Are you awesome?

  • This Question is Closed
  1. ParthKohli
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    I am trying to build a webpage for this: ``` import random print("Are you awesome?") randomnum = randrange(1,10) name = input("What is your first name?") if (len(str(name)) == int(randomnum)): print("Yes!") else: print("Nope...") ```

  2. ParthKohli
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    I have had this so far (don't care about the poor design for now): ``` <!DOCTYPE html> <head> <link href='http://fonts.googleapis.com/css?family=Ubuntu' rel='stylesheet' type='text/css'> <style> body { background-color:#c0c0c0; } span { position:fixed; top: 50%; left: 50%; width:30em; height:18em; margin-top: -9em; /*set to a negative number 1/2 of your height*/ margin-left: -15em; /*set to a negative number 1/2 of your width*/ background-color: #c0c0c0; font-family:'Ubuntu'; } </style> <input type = "text" value = "Enter your first name." id = "nameFirst"> <div id = "output" style = "position:fixed; length = 9px; width = 9px;">...</div> <script type = "text/javascript"> var randomnumber= Math.floor(Math.random()*11); var name = prompt("What is your first name?"); var boole = (name.length() == randomnumber); function awesomeness() { if boole == true { document.getElementbyId("output").innerHTML = "Yes!"; } else { document.getElementbyId("output").innerHTML = "Nope..."; } } </script> <input type = "button" onClick = "awesomeness()"> <title>Are you awesome?</title> </head> <body> <span><h2>Are you awesome?</h2></span> </body> </html> ``` Does anyone know why it doesn't work?

  3. ParthKohli
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    I know I am a newbie. ='(

  4. Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Ask a Question
Find more explanations on OpenStudy

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.