InterviewSolution
| 1. |
Solve : Visual Basic Codes? |
|
Answer» i need help finding the codes to MAKE these questions work on visual basic if i do find some codes Don't "find" them, write them yourself. Have you had any programming lessons? Have you got any course material? have you studied it? what the heck is a "For- Next Sentence"? HERE is one answer. Oh you wanted Visual Basic? Oh darn. I'm actually better with VB then python but this will make things far more frustrating until you actually do the work yourself. 1. I ignored the "insert" thing and pretended it meant input. Code: [Select]#!/usr/bin/env python import math inputresult = raw_input("Enter Number:") inputresult = float(inputresult) print "Negative Number" if 0 > inputresult ELSE "number " + str(inputresult) + " has " + str(int(round(math.log10(inputresult),0))) + " DIGITS." Also sadly I think you are actually expected to determine the number of digits in the number by just looking at the length of a string. I was going to do the other ones but I lost interest. |
|