Few LONG questions unanswered.

I was given quite some questions and need help with some of the questions.Lemme post them help? The main thing is i need the code for to make the answer appear.
1.       What’s Your Excuse?
      Write a program that helps students come up with excuses for coming late to school.         The program should prompt the user to enter the following information:
·         Number of minutes late
·         Level of problem
·         What problem you had
·         Which class you missed
·         What type of transport to school
            After the user has entered these items, the program should display the following    excuse, inserting the user’s input into the appropriate locations:
                        I was NUMMINUTES today because I had a LEVEL problem with                                  SOMETHING. This problem really made me totally forget about your                               CLASS today. And, then when I left my home it only became worse. I missed                   my TRANSPORT. Then, the TRANSPORT I got in was so slow today. Sorry
                        about that.
2.       How Fast?
            A guy is training for the triathlon. Every triathlon has three parts: a swim, a bike ride,        and a run. The triathlon for this problem has a 1.5 km swim, a 40 km bicycle ride, and       a 10 km run. Write a program to ask the user to enter, in hours, the following information:
·         The time to do the 1.5 km swim
·         The time to do the 40 km bicycle run
·         The time to do the 10  km run
            Then, the program should print as output the following information:
·         The rate at which he did the swim ( km / min)
·         The rate at which he did the bicycle run ( km / min)
·         The rate at which he did the run (km / min)
·         The total time he took for all three parts of the triathlon (in minutes)
3.       Guess The Card!
Can you correctly guess the card the computer is holding in its hand? I will give you one chance!
In this game the computer will randomly pick a card from 1 to 52 (e.g. 4 of diamond). If the card is between 1 and 13, inclusive, then it is a “club”. If the card is between 14 and 26, inclusive, then it is a “diamond”. If the card is between 27 and 39, inclusive, then it is a “heart”. If the card is between 40 and 52, inclusive, then it is a “spade”.
Write a program to ask the computer to pick one card at random (e.g. Jack of Spade). Then, the player should be asked to enter two values: the type of the card (i.e. Club, Diamond, Heart, or Spade) and the number (1 to 13). If they both match the card picked by the computer, the player wins and the displays the message “Correct! You Guessed It!” Otherwise the player loses and displays the message “Sorry! You Guessed Wrong!”
You assume the order of the 13 cards for each type as follows: Ace, 2, 3, 4, 5, 6, 7, 8, 9, Jack, Queen, and King.
Note that you are not supposed to use any loops for this problem. (Hint: To have the computer roll a dice randomly, use the appropriate random number generation function)
Sorry for the long questions though =x.

var minutesLate:Number = Number(numberMinutes.text);
var levelOfProblem:String = level.text;
var whatProblem:String = something.text;
var lessonMissed:String = classMissed.text;
var transportType:String = transport.text;
trace("I was "+minutesLate+" today because I had a "+levelOfProblem+" problem with "+whatProblem+". This problem really made me totally forget about your "+lessonMissed+" today. And, then when I left my home it only became worse. I missed my "+transportType+". Then, the "+transportType+" I got in was so slow today. Sorry about that.");
I tried out.Thats my answer for question 1.

Similar Messages

  • A few various questions

    Can anyone help me with a few various questions about how to do certain things on the iPhone? Here's my questions:
    - Is there a way to turn off predictive text? I'd like to enter in a phone extension for a contact. I create a new field for the extension number. Then enter in "EXT" but it comes out to "ECT". Also, is there a way to delete that field? Is there a better way to do extensions?
    - How do I hide the keyboard when there isn't an option to hide it? This happens in the Mail settings area.
    - Is there a way to keep the keyboard in all caps just for a single word rather than having to switch to caps for each letter?
    - When I bookmark a website, sometimes the bookmark title is long so I can't see it all. I can click into the field but that puts the cursor at the end of the text string. Is there a way to then scroll left and see all of the words?
    Thanks,
    Brett

    Ok this should be a long one so dig in haha. Ill answer them in the order you asked.
    No, there is no way as of right now to turn off the predictive text feature. You must make sure to cancel the blue suggested word before hitting the space bar.
    There isnt an option to hide the keyboard in any of the applications on iPhone. Im not quite sure what you mean on this one either.
    There is a way to use all caps letters if you have enabled caps lock in the keyboard settings menu and then double tap the icon when typing. It will turn blue when it has been done correctly.
    If you tap and hold your finger on a piece of text, it will pop up a little magnifying glass which can be used to scroll left and right. Its a bit tricky to find the right place on the screen that will make it move though. You will get the hang of it eventually.
    Hope this helps. Enjoy your iPhone!!

  • Few problems/questions! (cover flow, album art...etc)

    Ok I finally added my songs to my new IPOD (replaced my old one) and this is my first Ipod with video, color...etc. Its the IPOD Classic 80 GIG.
    Well I am having a few problems/questions:
    ---Why when I hit "Get album art" does it ONLY get art for my videos? It doesn't get any for all 1,500+ songs! Is it because they aren't downloaded from Itunes? If so then why does it do it for the movies then? They aren't from ITunes either!
    ---With Cover Flow I updated the Album Art myself and have about 700 songs with art now. But I have two problems.
    1. It won't display all 700 songs under Cover Flow!
    2. It won't show them in order by song name! Can I change that?!? If not then how is it showing them by? What do I need to change?
    ---Are there any other video types supported besides that on Mpeg4 and that other weird type? If not why not? Its a pain to have to convert everything. Its almost not worth having this video IPOD if you have to go through sop much effort just to watch 1 stupid video. I mean I spent more money on extra programs now for music and videos then I did on the IPOD almost.
    ---Is there any way to transfer your music from one IPOD to another? I know some people say you can't but why? What about people like me who have music ripped from our own cds and NOTHING from ITunes? Its a REAL pain having to rerip all the cds, put them back on, rename all the songs, fix all the info...etc. Its taken me 4 days now. Apple needs to think about a "IPOD TO IPOD" music transfer kinda program.
    ---How do you get pics on the IPOD without having to keep them on your PC? I notice it has to SYNC them every time I have it plugged into the PC! But if I tell it NOT to sync pics anymore then they won't stay on the IPOD if turn that option off and unplug the IPOD. Theres got to be another way to add them.

    Assassin X wrote:
    ---With Cover Flow I updated the Album Art myself and have about 700 songs with art now. But I have two problems.
    1. It won't display all 700 songs under Cover Flow!
    2. It won't show them in order by song name! Can I change that?!? If not then how is it showing them by? What do I need to change?
    Cover flow on the ipod can only be done (as far as I know) on Album by Artist Name. On iTunes you can change it around
    Assassin X wrote:
    ---Are there any other video types supported besides that on Mpeg4 and that other weird type? If not why not? Its a pain to have to convert everything. Its almost not worth having this video IPOD if you have to go through sop much effort just to watch 1 stupid video. I mean I spent more money on extra programs now for music and videos then I did on the IPOD almost.
    Try using freeware, heres an excellent video converter for iPods:
    http://www.videora.com/en-us/Converter/iPod/

  • A few simple questions from a new Iphone user

    Hi a few simple questions, just got an iphone 2g - 2nd hand so not really sure what to expect. Anyway I guess my first question is about mine sometimes being a little slow - when I look at contacts and sometimes when sending a txt it slows down/freezes a little - normal?
    Secondly Edge - I havent used it much but when I have its been painfully slow, is this normal - is it always really slow - cause I had read despite not being 3g Edge was actually pretty fast - what exactly is data roaming by the way? I mean I have been switched off as basically I dont wanna use the internet till next month when they change my contract to one I get unlimited access on - is that right?
    Im having a problems syncing videos to it - it just wont sync some but will others and Im not sure why - theyre same file type and they used to sync to my ipod touch but now they wont for some reason
    Cheers

    I have the origina iPhone.
    Downloaded 2.0, synced phone with everything UNchecked. Installed 2.0. Synced with all the options checked to reload my data. The iPhone has been great. Noticed a little lag when I opened contacts. Installed the new upgrade, and everything is back, no lag.
    Edge is Edge and nothing more. It is slow compared to a strong 3g signal. But is liveable most of the time. Heavy traffic can slow it down to barely usable.
    My four wheel drive club has a web site with a large photo section. I was standing out in the middle of parking lot in San Jose, Ca and showing a friend some photos. It opens up a page of small picts to choose from. Select a print and it enlarges, He was amazed at how fast they appeard. Especially given the quantity of photos.

  • Few fundamental Question- Project IMG and BBPs

    Dear All
    I have few basic question and will appreciate answers ,. points will be awarded as well.
    1. Is there any difference between Enterprise IMG and Project IMG ( or is there any thing such as Enterprise IMG exists in Solman).
    2. Can scope of project IMG be changed once it has been creted and saved. ( if yes then Steps plz)
    3.How to create BBP nodes in Solar02 based on Project IMG.
    Regards

    Hi Nayab,
    1. In simple terms, Project IMG is a sub-set of Enterprise IMG, based on what you scope in. It can also be a mirror image of Enterprise IMG (meaning - all entries can be included in Project IMG). If you go to SPRO transaction in the given satellite system (R/3, CRM ...), you'll find different icons in front of each IMG node, under Project IMG - that is to let you 'document' your activities. Enterprise IMG is the core or reference IMG that SAP provides out of the box.
    2. Yes. it can be changed. But, I am unable to list steps here
    3. By BBP nodes in SOLAR02, what did you mean ? I have heard the term BPP (Business Process Procedure) or BB (Business Blueprint). Can you elaborate please.
    Also, the whole topic of Project IMG Vs. Enterprise IMG is about the satellite system involved  and not on SolMan's own configuration.
    Regards,
    Srini

  • Just a few small questions :)

    hi guys, just had a few small questions incase any of u can shed some light on the subject
    1 - i have removed my Sound Blaster Audigy and i am now able to reach 2.5GHz easily, when the audigy was installed, i could never get over 2.4Ghz, why?
    2 - i have increased my vcore to 1.7 yet am experience lower idle temps with c'n'q enabled eg...2.4GHz @ 1.55v would idle at 29c.....2.5GHz @ 1.7vcore idles at 23c, how?
    3 - moving my ballistix ram into dimm slot 3 i am now able to go 1:1 to 228 htt at timings 2.5,2,2,10 easily...when the ram was in dimm slot 1 i couldnt go 1:1 over 200 htt, why?
    if anyone can comment or provide answers i would be most greatful
    thanks guys
    mike XxX

    NetStream.send() should usually be faster than NetGroup.post(), especially when using 1:1 NetStreams (vs Group NetStreams).
    when groups are large, there's no passive way to tell when members join or leave.  however, for small groups (less than about 15 members), they will be "fully meshed", meaning every member has a direct connection to every other member.  when that's the case, you can see the NetGroup.Neighbor.Connect/Disconnect events on a NetGroup.  to receive those, you must create a NetGroup with the same groupspec as your NetStream and listen for NetStatusEvent.NET_STATUS events.
    your function "msg" must be a method on the subscribing NetStream's "client" object to receive NetStream.send()s from the publisher.
    this is all generic ActionScript stuff.  i don't know how to use Flash CS5 but this stuff should all be the same in Flash and Flash Builder.
    -mike

  • Few basic questions about database administration

    Hello,
    I have a few basic questions about database administration.
    1. I switched one of my oracle instances to archivelog mode. I just cannot locate the archive log files on my windows system. The %ora_home%/ora92/database/archive directory is desperately empty...
    2.What is the tools01.dbf datafile used for?
    3.What is the undotbso1.dbf datafile used for?
    Thanks in advance,
    Julien.

    1. The archive log location needs to be specified in your init.ora file. By default, Oracle will place the archive files in either ORACLE_HOME/dbs or ORACLE_HOME/database.
    2. The tools01.dbf file belongs to the tools tablespace which should be set as the default tablespace for system. It primary purpose is to hold Oracle Forms and Reports database objects, however, it should also be used for holding other non sys database objects such as the perfstat (statspack) or other third party database schemas e.g. quests sqllab.
    3. undotbs01.dbf file belongs to the undo tablespace.

  • Before upgrading iPhone to 3.0 beta a few basic questions!

    We have a few apps up in the store, and I want to upgrade them, so I suppose I need to upgrade my iPhone now to the beta 3.0 firmware.
    Before doing so, I'd like to ask those who have gone before me a few simple questions.
    (1) I don't have anything on my iPhone that is earth-shatteringly important. But if I need to, can I restore to OS 2 and get my old email settings and apps back?
    (2) What does updating to the beta 3.0 firmware really mean? Will I get to preview all the core OS 3.0 apps, including the search features, new Camera, Mail and Safari apps, etc.? If so, that sounds like fun.
    (3) What happens when I synch with iTunes while the beta 3.0 firmware is installed? Will normal synch still work?
    Thanks for any tips or advice on this. I can't afford to get another iPhone device just to maintain my current apps.
    doug

    "A user was earlier reporting that she was getting prompted for clean access login again and again"
    I recommend that you check manage subnet and vlan mapping at the CAS the problem could be located at that level.
    Regards

  • A few quick questions about publishing for iPhone/Android

    I'm currently developing an iPhone/Android game in CS5 and I just have a few quick questions.  If anyone can answer even one or two I'd really appreciate it
    1- I'm developing using a 320 x 480 resolution for the iphone.  When I tested it, the status bar on the top of the screen makes the edges disappear.  How should I turn off the status bar?  And if I can't what resolution should I use?
    2- The performance is a little slow, and the game isn't very intense at all.  What's a good way to improve performance?
    3- For Android, what should I do for the resolution?  Is there a standard resolution or do I have to have multiple resolutions for multiple devices?
    4- Finally, is it worth getting the free trial of CS5.5 before I publish?  Is there anything in there that will be a huge improvement over CS5?
    All help is appreciated

    1. Publish in fullscreen
    2. Use bitmaps, cache all bitmaps, use minimized looping structure etc.
        http://www.yeahbutisitflash.com/?p=986
    3. Android: 480 * 800
    4. Not that much, but you have GUI updates and have a GUI publishing screen for packager for iphone too.

  • Vibe Z2 Pro - Few newby questions

    Hello, as a newby, I have a few simple questions about Z2 Pro and Vibe UI:
    (a) the main issue I have with Vibe UI on this phone is that the 4-apps-per-row look very huge, can you cange it to 5 apps per row with some settings? that would be really useful, as most other big phones are 5 apps per row.
    (b) can I make a guest mode? I think I saw with some other phones, that you can make a guest mode, so that your little cousens don't see all your apps that they don't need to see. I know there is secure mode but that is sothing else.
    (c) can you use Z2 Pro to make the payments with the phone? I know it has the NTF, but don't you need a finger print scanner for that?
    (d) in the camera settings, when I tested the phone, I could not choose 1:1 for the front camera, only for the selfie camera? Is that really so? I would not see why not.
    (e) in the camera settings, I can choose between 3:4 and 16:9 but I somehow could not find the settings for image resolution. what do I do if I want low resolution photos or very high resolutio photos?
    (f) I assume, you can't charge the phone wirelessly, that would be too much to ask for
    Thanks guys.

    Hi, ileyb
    Unfortunately I don't know, what is the "Security Zone" & will be very grateful if you explain a bit about this feature or provide an appropriate link.
    In order to switch to "stock android", you have to do the next:
    1) Go to Settings > About phone > Version information, tap 7 times on "Software version number". This will unlock "Developer options" settings section.
    2) Go to Settings > Developer options > Switch System UI Style and enjoy,

  • Yes/No fields, single line. Long question in seperate text field. How to avoid gap between lines?

    I have made two single-choice fields side by side (Yes and No) on one single line. The question for the choices is long, so I wrote it in a separate text field placed above the Yes and No fields. If I use the Yes field for the question, the No field would end up too far to the right.
    Question ....
    [Single-choice text fields space]
    [  ] Yes
    [  ] No
    Problem now is there's too much space under the question, since the automatic text fields in the Yes and No fields are still there, though "invisible"/not used. How can I have a long question on a single line and have the Yes and No fields on the next line without a big gap between the two lines? Is it possible to delete the automatic text field in the Yes and No fields?
    Just realised that if one makes a single Yes field, and a single No field to the right, you are ("of course") able to mark both the fields, since they are not linked anymore as with two choices in one field. The point with the single choice fields is then lost; to be able to choose only either one. Yes or No.
    [X] Yes   [X] No

    The Single Choice is designed such that you have a single label and multiple choices, but the user can only select a single choice (in your case Yes or No).  If you like the choices to appear side by side you can deselect Stack Choices Vertically in the Field Properties widget.  You should also set the Label to Above.  See the attached image.
    Jeff Canepa
    Software Quality Engineer
    Adobe Systems, Inc.
    [email protected]

  • Few simple questions from newbie

    I'm new to Java, but i've worked a lot with action script... it didn't help a lot :) Here are my few beginner questions:
    What does: public, static, abstract, void... and other things mean in front of the class name?
    How can i call variables from another classes: if i have one class that does one thing and stores the result in a variable, how can i use that variable from a different class?
    How can i call the input window to enter the value for variable? I've tried with importing "io.inputstream" library, and used the "extend" thing, but i still cant call the input window?

    I came to Java from ActionScript too, and I must say having ActionScript as your first programming language does NOT make it easy to learn other languages. I was incredibly lost when starting with Java.
    What does: public, static, abstract, void... and
    other things mean in front of the class name?You'll find all that in the Java Tutorial
    How can i call variables from another classes: if i
    have one class that does one thing and stores the
    result in a variable, how can i use that variable
    from a different class?To use the variable from another class, you need to make a call to the class. Let's say you're in ClassB; you would make a call to a ClassA variable by doing something such as:
    ClassA.myVar.myMethod();
    How can i call the input window to enter the value
    for variable? I've tried with importing
    "io.inputstream" library, and used the "extend"
    thing, but i still cant call the input window?I recommend reading the tutorial before you try anything like that.

  • A few beginner questions

    I installed AD7 as part of the CS2 Premium package. I have a few basic questions to help me get started.
    1. I have added a Text Field box. When I preview the form and enter text in the form, the text starts in the vertical center of the form, not at the top. I have allowed for many lines of input, but I want the text that is inputed to start on the top and work down the area as the user types, not keep the text centered vertically.
    b How do I change the text field so that the user text starts at the top left of the field?
    2. I'm not really ready to accept the data from my forms as XML. I'd have to write some sort of XML parser or use a database program to read the data. I do not get volumes of data. I would just like to receive a filled in PDF file via e-mail that is easy for me to read after the user fills in their data.
    b How do I code the form so that when the user is ready, it submits the completed form back to me via e-mail in .pdf format?

    I finally found the answer to my question #1, Use the Window<Paragraph to set the attributes for the text field paragraph.<br /><br />I'm still trying to figure out #2 though.<br /><br />I have a new question too<br /><br />b How do I add a note in my form like I can when creating a PDF document in Acrobat?<br /><br />I want to use the note as detailed instructions on how to fill out a particular field.  Perhaps, AD7 has some other way of accomplishing this that is not called a "note"?

  • Discussion Forum does not display the items in Answered question ,Unanswered question views.

    Hi All,
    Discussion Forum does not display the items in Answered question ,Unanswered question views. Please find the below screen
    what is the difference between Answered and unanswered view?
    I have marked  the discussion as question .
    have replied for the question those discussion are visible in Unanswered view and the answered view is showings as no item to show.
    Below screenshot is answered questions view.
    Can you please help on this .
    Thanks in advance ,
    Sunitha

    The discussion in which at least one of the replies is marked as "Best Reply" will show in the "Answered Questions" section.
    Blog | SharePoint Learnings CodePlex Tools |
    Export Version History To Excel |
    Autocomplete Lookup Field

  • A few good questions. I can handle the truth.

    I'm afraid the more I read the more I get confused so I would like to ask a few streamlined questions:
    1. I want to create a single form to be used only by four Quality Control supervisors to monitor our 120 employees on a continual basis.
    2. I want to gather the data results automatically that upper management can view.
    It seems from my reading so far that a webform is the best way to do that.I have experimented with a few forms but what I'm finding most confusing is the distribution and how it is hosted. Can a user save the file sent via email and use it multiple times? Would it be better to host on an intranet? Lastly, I purchased Acrobat Pro XI with the understanding that Forums Central was part of the subscription but I was not able to effectively do what I have done so far without trying the $0.99 trial upgrade. Do I need this upgrade for my intended use?
    Thanks!!!

    Hi ou812jb,
    Thoughts and answers in roughly the order you asked...
    No matter which way you distribute your form, as a PDF or as an online form, you have limited control over limiting access. If it is a PDF, you can e-mail that to those four supervisors... but if they forward, copy, or otherwise distribute the form to others, then you may get more people with access to the form than you had intended. Likewise, with the web-based form: you can send the URL to the four supervisors, but if they share that URL with other people...
    Your form will gather the data, and even provide simple analytics on the results, for you and/or upper management to view.
    Without knowing more about the types of questions you want to ask, it's hard to say which way would be better - PDF or online. Unless you need a specific, exact layout, that also needs to be printed, then a web form is perhaps easier. The distribution and data are hosted by Adobe's servers and site... there is no local hosting option.
    If using the web form, the supervisor would simply go to the URL of the form and fill in a new form. If it is a PDF form, the supervisor would open a new copy of the PDF, fill it out, and then click the Submit button on the PDF, thus sending the data to Adobe's servers.
    The FormsCentral application is included in the Acrobat Pro XI box, but that doesn't include any of the actual service... just an application. Though if you have Flash installed on your computer, you can do all of the design work inside a web browser instead. Yes, I would spend the $0.99 to get acclimated to the product. If you're at all like me, you'll then see dozens of ways to use it beyond what you had originally anticipated.
    I hope this helps,
    Brian

Maybe you are looking for

  • Migration manager connection issues

    I just bought a new iMac from BestBuy. When I fired up the new iMac it gave me the option to migrate files from my old iMac. Unfortunately, neither iMac is able to find eachother. What I've done so far: 1. Ensured I was running Mac OSX 10.4.11 and in

  • Turn completely off or simply lock?

    I'm guessing these functions are similar to the sleep and deep sleep modes of my old 5th gen iPod video, but I'm not sure whether it's better for my battery consumption to press and hold the on/off button for a couple of seconds until the red slider

  • How do I make sure that CS5.5 Merge clips encodes Audio at correct volume?

    Windows 7 x 64, 2 TB, 12 GB RAM, I am using the Premiere Pro CS5.5 Trial (full version), particularly because of the new Merge clips feature. The Merge clips works intuitively and easily; this is a fantastic advantage. I am creating these clips to us

  • Issues concerning Photoshop 7.0 with OS 10.5.4

    I am trying to find out if there is anyone who has experienced any issues concerning Photoshop and OS 10.5.4? Specifically, before I installed 10.5.4 my P-Shop 7.0 was working fine. After the install I can't open it at all...the error message reads "

  • IPhone SDK UISegmentedControl and hiding view

    Hello, Im slowly getting to grips with the iPhone SDK but having a problem today, I have a UISegmentedControl setup to a toggleSetting function but this toggleSetting calls a url in the background for some data, but this freezes my application while